WordPress.org

Ready to get started?Download WordPress

Forums

nrelate Related Content
How would I implement popular posts onto he homepage? (2 posts)

  1. Torlock
    Member
    Posted 11 months ago #

    Hello,

    Great plugin! Just got a few questions about implementing it.

    I want to get rid of the posts on my homepage and replace them with this plugin on the lower left hand side with my own CSS.

    I have added <?php nrelate_related() ?> and checker is_home option in layout. However it doesn't appear.

    I have also tried simply adding the shortcode to a text section on the homepage which also didn't work.

    Also, I was wondering, even if it did show up where would it be positioned? So I came up with the idea of putting in a div which my theme uses. i.e.

    <?php if(is_home()) { ?>
    
    <div class="flex_column av_one_half first  avia-builder-el-0  avia-builder-el-first  "> nrelate_related() </div>
    
    <div class="flex_column av_one_half   avia-builder-el-1  el_after_av_one_half  avia-builder-el-last  "></div>
    
    <?php } ?>

    Unfortunately my PHP skills aren't very good at all so I assume this code would work, but if can understand from the above code what the idea is, would you know how the right code to do it?

    Thanks in advance for any help! :)

    Site is http://bit.ly/14DPL6B

    http://wordpress.org/plugins/nrelate-related-content/

  2. katrina@nrelate
    nrelate Support Rep
    Posted 11 months ago #

    @Torlock -- Thanks for using nRelate on your site. Can you also try to check off "is_front" under your layout settings? Depending on your theme, your "front" page could be your homepage. Then once those two pages are checked off, you'll want to apply our php function into your index.php file (index.php is generally the homepage of your theme).

    - Katrina @ nRelate

Reply

You must log in to post.

About this Plugin

About this Topic