• Resolved Pasta78

    (@pasta78)


    Hi,

    I already spent several hours on this and tried various text widget plug-ins…

    Where can I find an advanced text widget plug in that enables me to publish unique text ads/html/php codes on all posts under a specific Category?

    (1) I want to publish different ads for each Category.

    (2) I mean, I want the ad not only to be published under the main Category page (already found text widgets that support that), but INSIDE ALL POSTS of that Category?

    Couldn’t find any Text Widget plug-in that enables me to publish inside the POSTS themselves.

    I’m looking for a Plug-in solution to this, not solutions that require me for code changes in WP.

    Thanks for your help.

Viewing 15 replies - 1 through 15 (of 19 total)
  • brasofilo

    (@brasofilo)

    I think this one will do what you want:
    http://wordpress.org/extend/plugins/widget-logic/

    Thread Starter Pasta78

    (@pasta78)

    Thanks. Yes I already installed Widget Logic, but the problem is that it can do that only via .php tweaks in WP .php pages, I’m looking for a simple plug-in that doesn’t requires any coding knowledge, I’m not a programmer… Thanks. Yes I already installed Widget Logic, but the problem is that it can do that only via .php tweaks in WP .php pages, I’m looking for a simple plug-in that doesn’t requires any coding knowledge, I’m not a programmer…

    brasofilo

    (@brasofilo)

    I don’t understand your problem…

    Doesn’t this conditional tags address your issue?
    http://codex.wordpress.org/Conditional_Tags#A_Category_Page

    Thread Starter Pasta78

    (@pasta78)

    I tried the following as per what the author of Widget Logic says:

    is_category(X) || (is_single() && in_category(X))

    This should make the widget work on the category page and within each post that belongs to that category.

    I tried it. Widget works on the category page, Widget will not show up on any post under this category…

    My problem is – how can I see a widget inside all posts that belong to a specific category?

    Thanks.

    Thread Starter Pasta78

    (@pasta78)

    Nope. I tried the following as per what the author of Widget Logic says:

    is_category(X) || (is_single() && in_category(X))

    This should make the widget work on the category page and within each post that belongs to that category.

    I tried it. Widget works on the category page, Widget will not show up on any post under this category…

    My problem is – how can I see a widget inside all posts that belong to a specific category?

    Thanks.

    Thread Starter Pasta78

    (@pasta78)

    Nope. I tried the following as per what the author of Widget Logic says:

    is_category(X) || (is_single() && in_category(X))

    This should make the widget work on the category page and within each post that belongs to that category.

    I tried it. Widget works on the category page, Widget will not show up on any post under this category…

    My problem is – how can I see a widget inside all posts that belong to a specific category?

    Thanks.

    brasofilo

    (@brasofilo)

    Pasta78, you say you tried is_category(X) || (is_single() && in_category(X)), I suppose you didn’t use X instead of 'category-id' or 'category-slug' or even 'Category Name'

    Thread Starter Pasta78

    (@pasta78)

    no…I didn’t use X, I used something like:

    is_category(‘dog-training’) || (is_single() && in_category(‘dog-training’))

    Where ‘dog-training’ is category.

    This supposed to work in all the posts of ‘dog-training’ but it only works in ‘dog-training’ main category page.

    brasofilo

    (@brasofilo)

    try this one:
    in_category( ‘dog-training’ ) || post_is_in_descendant_category( ‘dog-training’ )

    Thread Starter Pasta78

    (@pasta78)

    Doesn’t work…crashes WP with an error!

    Max Chirkov

    (@maxchirkov)

    Have you tried Advanced Text Widget?

    Thread Starter Pasta78

    (@pasta78)

    Yes, doesn’t work either…
    Won’t display the Widget inside posts.

    brasofilo

    (@brasofilo)

    sorry, looks like the Documentation points to a function that doesn’t exist… post_is_in_descendant_category

    I’ve searched for it in the core code and couldn’t find it…

    but you can create your own as shown in this post
    http://wordpress.org/support/topic/widget-logic-conditional-check-parent-category-help?replies=19#post-1018899

    deepbevel

    (@deepbevel)

    trying to understand the goal here, looks like you need widgets in posts, and different widgets in different posts?

    Two easy to use plugins come to mind, both with no php tags or values to fill. Dynamic Widgets and Widgets on Pages. Dynamic widgets will give you category based text widgets, Widgets on Pages uses shortcode to display widgets in pages and posts.

    Thread Starter Pasta78

    (@pasta78)

    Dynamic widgets won’t work on posts…
    Widgets on Pages is no different than Widget Loigic…

    I don’t understand how such trivial feature in WP isn’t available, I’m sure I’m not the only one who needs to display ads on posts that belong to specific category.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Text widget to display on posts under specific category’ is closed to new replies.