nastycanasta
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Is there a featured image bug in twenty eleven???hmmmm, a bigger image worked but I think I’m confused. Isn’t the featured image supposed to be part of the post and not the header image. Is the featured image a header image?
Forum: Fixing WordPress
In reply to: Enabling thumbnails from postsTry this code in your functions.php, this works if you have a featured image uploaded to your post and you want it to show up if you’re using excerpts. You can change the size of the thumbnail in the array
function my_excerpts($content = false) { // If is the home page, category, an archive, or search results if(is_front_page() || is_home() || is_category() || is_archive() || is_search()) : global $post; $content = $post->post_excerpt; // If an excerpt is set in the Optional Excerpt box if($content) : the_post_thumbnail(array(200,160), array('class' => 'alignleft excerpt-thumbnail')); $content = apply_filters('the_excerpt', $content); // If no excerpt is set else : $content = $post->post_content; $excerpt_length = 55; $words = explode(' ', $content, $excerpt_length + 1); if(count($words) > $excerpt_length) : array_pop($words); array_push($words, '...'); $content = implode(' ', $words); endif; $content = '' . $content . ' '; endif; endif; // Make sure to return the content return $content; } add_filter('the_content', 'my_excerpts');
Forum: Fixing WordPress
In reply to: Someone please help me with functions.php pleaseI actually created a new functions.php file with only opening and closing tags and then inserted your code and it worked. Then I tried putting other code and that was saved successfully too. Thanks. What do you think was causing the error?
Forum: Fixing WordPress
In reply to: Someone please help me with functions.php pleaseI probably should have been more clear when I upload a new php file it does have the opening and closing tags on it but it’s blank otherwise. When I put any type of code in between them, I’m still getting the error. And yes, the opening tag is right at the very top with no spaces. Any other suggestions?
Forum: Fixing WordPress
In reply to: i keep getting error when i edit my functions.php fileThanks Rev. Voodoo I added it at the end of the file but I think there wasn’t a closing php tag there.
Forum: Fixing WordPress
In reply to: i keep getting error when i edit my functions.php fileThanks a lot for your help! Didn’t know that I shouldn’t try to make changes in the default theme