Php The_Excerpt Not Working
-
I’m trying to get excerpts for post to show up with the plugin “Category Grid View Gallery”. Right now it displays the title of the post by default. Here is the code for displaying the title:
$cgtitle='<div class="cgback cgnojs '.$this->params['showtitle'].'"></div><div class="cgtitle cgnojs '.$this->params['showtitle'].'"><p style="font-size:'.$cgfontsize.'px;line-height:'.(1.2*$cgfontsize).'px;"><a href='.$returnlink.'>'.$title.'</a></p></div>'; return $cgtitle;
So yeah, this is the php code that spits out the title links to each post. I tried to add the excerpt by adding in the following code right after the closing “</p>” tag…
<div id="lol"><?php the_excerpt(); ?> </div>
I set the div “lol” to 200px and with a grey background.. the div shows up where it should, but there is no excerpt. And yes, I have went into the screen options ina wordpress post and made an excerpt, still nothing! Other than that, here are the folowing thing I have done to try and get this working:
1) Change “<?php the_excerpt(); ?>” to “php the_excerpt();”.
2) Change “the_excerpt” to “the_content” to see if it would show.
3) Move the div “lol” to a different spot.And none of the above showed the excerpt for each post. I know I’m doing something wrong, I just don’t know what it is. Right now, I’m off to play video games with my brother for the next 15 minutes, if anyone could help me out and suprise me with a solution for this problem it would mean sooooooo(oooo) much to me! ??
- The topic ‘Php The_Excerpt Not Working’ is closed to new replies.