• I am trying to get a clients site to show of the latest blog posts in that category on the page.

    I have got this to work on the category archive page so if they are in Legal-Update category it shows the latest 2 posts from the legal update at the bottom in the thesis hook thesis_hook_after_post_box. Example:
    https://westmichiganlaw.com/legal-update/

    But if you go into an actual post it shows up blank.
    https://westmichiganlaw.com/michigan-real-estate-tax-new-transfer-of-ownership-rules/

    Not sure what to do from here. Have been trying to figure this out for a while now and asking for help.

    Here is the current code.

    <div id="clearer"></div>
    <div id="beforefooter" >
    <?php
    if (is_page(array ( 'government-contracting-blog’ , ‘govcont2test' ))) {
    
    recent_posts('prefix=<div class="poster"><h3>Latest Government Contracting News</h3>&included_cats=6&suffix=</div>&limit=2&output_template=
    <ul>
    <li>
    
    <div class="test1">
    <p class="feat_headline"><a href="{url}">{title}</a></p><p>{snippet:250:word}...<a href="{url}">read more</a></p></div></li></ul>');
    
    } elseif (is_page( '' )) {
       recent_posts('prefix=<div class="poster"><h3>Latest Legal News</h3>&included_cats=3&suffix=</div>&limit=2&output_template=
    <ul>
    <li>
    
    <div class="test1">
    <p class="feat_headline"><a href="{url}">{title}</a></p><p>{snippet:250:word}...<a href="{url}">read more</a></p></div></li></ul>');
    }
    
    ?>
    
    </div>

    Any help is greatly appreciated.

  • The topic ‘Thesis Show Posts in Category’ is closed to new replies.