WordPress.org

Ready to get started?Download WordPress

Forums

Setting Sidebar so only certain plugins show on main page (4 posts)

  1. rockstarpoet
    Member
    Posted 7 years ago #

    I couldn't think of a way to say that more concisely.

    I want to set certain plugins---like recent comments---to only show up on the main index page. Is there an easy way to do this?

    I tried hacking some PHP I saw but it didn't work:

    <?php /* Show Asides only on the frontpage */ if (!is_paged() && is_home()) { if (get_option('k2asidesposition') != '0' and get_option('k2asidescategory') != '0') { ?>

    But I am not using K2. Any suggestions?

    Thanks!

  2. whooami
    Member
    Posted 7 years ago #

  3. sefzig
    Member
    Posted 7 years ago #

    Hi rockstarpoet,

    maybe this isnt the leanest way to get your problem solved, but I works well for my blog:

    <?php if ((!$page_id) && (!$p) && (!$cat) && (!$s)) { echo "This must be the mainpage..."; } ?>

    In other words: If the actual page isn't a subpage, a post, a category and no searchresult, it must be the mainpage...
    Greetings,

    sefzig

  4. rockstarpoet
    Member
    Posted 7 years ago #

    Thanks.

    Whooami - I don't see anything that would help me in there.

    sefzig - I am not sure if we are talking about the same thing and if we are... that didn't work for me.

    Further clarification or other ideas are appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic