Forums

How to post sticky categorywise and not show them on homepage (5 posts)

  1. comedyfunnyjokes
    Member
    Posted 1 year ago #

    Hi,
    I have to show sticky posts category wise. For example, I have posted a sticky for category Birthday Jokes on page http://comedyfunnyjokes.com/category/birthday-jokes The sticky appears on the category for birthday jokes as well as on the home page. I want the sticky to only appear on the category pages and not on hoe pages. I have tried with 4-5 stickies for different categories and all of them appear on both pages.
    Please advice a way to show them on category pages only and not on home page.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    I need to know more detail. Do you want any stickies at all on the Home page? Are there a few that you want, but not all the others? How many categories do you want to exclude if not all?

  3. comedyfunnyjokes
    Member
    Posted 1 year ago #

    I do not want any sticky on the home page but only on categories.

    On the page, http://comedyfunnyjokes.com/category/birthday-jokes the sticky is moving down.... it should had been on top always. This sticky is also present on homepage and sidebars which is not required.

    My requirement is to put one sticky on all categories. I tried putting stickies for some categories now like on :-
    http://comedyfunnyjokes.com/category/adult-jokes
    http://comedyfunnyjokes.com/category/april-fool-jokes
    http://comedyfunnyjokes.com/category/funny-jokes

    Please tell me a way to do this... as I searched it seems I need to do some bit of coding. I am ready to do that. Please give some insight. I am using Tulip-Time theme which doesn't have any category.php or loop.php. I have archive.php.

  4. vtxyzzy
    Member
    Posted 1 year ago #

    You are right in thinking that you are in for a bit of coding. Stickies are designed to be used on the Home page, not on Category pages. You are trying to reverse the way they are used.

    That means you will need code in index.php to not use stickies and code in archive.php to use them.

    Before I can suggest any coding, I need to know a little more about what you want on the Home page. Do you want the jokes to show on the page but just in their normal non-sticky order, or do you want them suppressed completely?

    The sidebar is a different story. I don't know an easy way to keep the stickies from showing in the sidebar.

  5. comedyfunnyjokes
    Member
    Posted 1 year ago #

    Hi,
    I have solved the issue. I have got different stickies on different category pages. The coding is too easy ... there is no need to add any plugin for showing category wise stickies.
    You only need to add a piece of simple code in index.php.

    You can see the stickies working on http://comedyfunnyjokes.com

    You can see different stickies on different categories like http://comedyfunnyjokes.com/category/birthday-jokes

    Cheers :)

Topic Closed

This topic has been closed to new replies.

About this Topic