Grow your CSS skills. Land your dream job.

WORDPRESS: Excerpt used for Latest Posts but does not show up on browser…

  • # February 16, 2013 at 10:11 pm

    I am using a code to display Latest Posts on my static home page. The title and date work perfectly but when I try and add the_excerpt nothing appears…

    HTML// [http://cdpn.io/KdqAD](http://cdpn.io/KdqAD “http://cdpn.io/KdqAD”)

    Am I missing something?

    # February 16, 2013 at 10:57 pm

    @Keilowe Where is your foreach?

    Edit: Nevermind, I overlooked it. Where are you posting this excerpt?

    # February 17, 2013 at 1:15 am

    @chrisburton I am posting it inside of a file named main.php (Static Page).

    # February 17, 2013 at 6:40 am

    @Keilowe Do me a favor, instead of using `the_excerpt()`, replace that with `the_content()`. Does that work?

    # February 18, 2013 at 1:24 am

    No :( I thought of that too, no luck.

    # February 18, 2013 at 4:28 am

    That’s weird. I don’t see how you can get the titles and other dynamic content except the excerpt.

    # February 18, 2013 at 5:00 pm

    Try this.

    http://codepen.io/totallyoutrageous/pen/pIquG

    [Reference from the (Hulk) SMASH](http://wp.smashingmagazine.com/2013/01/14/using-wp_query-wordpress/ “WP_Query SMash”)

    [WP Codex: WP Query ](http://codex.wordpress.org/Class_Reference/WP_Query “WP_Query”)

    The issue likely lies in your choice of get_posts() or there’s a sneaky little filter on the_excerpt() somewhere, likely in functions.php.

    # February 21, 2013 at 9:37 pm

    @mcjohnst Wonderful! Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".