WordPress.org

Forums

How to display something on main page only? (7 posts)

  1. futb0l
    Member
    Posted 10 years ago #

    Is there some sort of function that I can use to only display things only on the main page???
    Thanks.

  2. futb0l
    Member
    Posted 10 years ago #

    Thanks a lot - Kafkaesqui :)

  3. zaxis
    Member
    Posted 10 years ago #

    yes! I need to know how to do this too! Mabe this issue will get answered in 2005!

  4. iand
    Member
    Posted 10 years ago #

    Something like <?php if ( in_category('3') && is_home()) { ?>? I think that should work. - i.e. will show posts in cat3 if your are on homepage. I have not tested this. Don't forget to close the if statement.

  5. Kafkaesqui

    Posted 10 years ago #

    IanD's suggestion will work for posts of a specific category, but if the something you want to display only on the home page is something else, it would help to know what that is.

    (And so, another thread that was hit by that most excellent "eat Kaf's forum posts" bug. ~cough~)

  6. hey_suburbia
    Member
    Posted 10 years ago #

    IanD,
    Where would you add this code?

    <?php if ( in_category('3') && is_home()) { ?>?

  7. EthanNeuen
    Member
    Posted 8 years ago #

    Heres a plugin that will do just that plus more:

    http://ryowebsite.com/wp-plugins/category-visibility/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.