WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Widget Logic] Making widgets appear only on the category page (4 posts)

  1. tech84
    Member
    Posted 2 years ago #

    Hi, I need help on this one,

    Currently I use the code: (is_category(Gaming) && in_category(Gaming))

    What I want to achieve is to make the widget only appear on:
    website.com/category/gaming/ and not on the succeeding pages and posts under that category.

    This is so far what I have achieved:

    * The widget only appears on the category "Gaming", site example here: website.com/category/gaming/
    * The widget does not appear on the single posts under the category: gaming

    My problem is, the widget would also appear on the succeeding pages on that category such as :
    website.com/category/gaming/page/2...
    website.com/category/gaming/page/3 and so on...

    What I want to achieve is to make the widget only appear on:
    website.com/category/gaming/ and no where else.

    Can anyone help me with this?

    Many Thanks,
    Tech

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    this should do:

    (is_category(Gaming) && !is_paged())

    http://codex.wordpress.org/Function_Reference/is_paged

  3. imobagg
    Member
    Posted 2 years ago #

    @alchymyth

    hi, I had the same issue. I'm trying to show a widget on the posts under a specific category. I tried the ...

    (is_category(Technology) && !is_paged())

    ... but it didn't work

    any ideas?

  4. imobagg
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic