Support » Plugin: Content Visibility » Block widget control on specific category pages?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Rich Tape

    (@iamfriendly)

    Thanks for the question.

    At the moment, you can choose to show or hide block widgets when the category archive template is shown.

    However, if I understand what you’re trying to do exactly, then you are currently unable to say “I want this block to show on these specific category archives and this other block to show on other specific category archives.”

    That being said, I think that’s an excellent idea. I suspect the same applies for other taxonomies such as tags and perhaps custom taxonomies too.

    I’ll look into adding this into an upcoming release.

    Thanks again for the question and the (implied) suggestion.

    Thread Starter Karl Andersson

    (@swekarl)

    Yes, you understand correctly! I already got it to work on the category archive, but to be able to control visibility based on specific categories (and also tags as you mention, and maybe URL strings) would take the plugin to the next level!

    Plugin Author Rich Tape

    (@iamfriendly)

    Really appreciate you letting me know I’m on the right track!

    I think I can add the category and tag rules to the next version of the plugin. It’s similar to the posts/pages, really.

    On another note, when you say “URL Strings” for something else you’d like to see, can you elaborate a little for me? I’ve seen other options in this space that offer this kind of functionality but it all seems a little… clunky. Possibly good for developers, but I’m trying to build something that just works for the vast majority of people.

    Would you be able to share some examples of what sort of thing you’d like to see for a URL string add-on?

    Thread Starter Karl Andersson

    (@swekarl)

    I don’t know exactly what I meant by URL strings, except that I saw that the plugin Block Visibility offers visibility control based on query strings, which I couldn’t use. So if there was no other way to choose a specific category, I could just use that category’s URL, I figured. But it’s better to make it simpler as you suggest.

    I ended up using Block Logic (at least in the meantime, sorry!) which uses conditional tags. It was a bit tricky but did the work.

    There seems to be surprisingly few plugins that offer category based visibility control for blocks, despite it was one of the features of a mainstream plugin like Jetpack! (Which only offers this control for legacy widgets, not blocks.)

    Plugin Author Rich Tape

    (@iamfriendly)

    Hey Karl,

    You don’t have to apologize for finding something else that works for you! I’m really glad you did. Block Logic is great, Sascha has done a great job with that plugin.

    Keep an eye out for version 0.2.5 of Content Visibility; it’ll be coming out once WordPress 5.8 is released. I’ve just added Category and Tag selection for block widgets.

    I still don’t have a great answer for query string behaviour, yet. I suspect that may just start out as a separate add-on which might be more developer-friendly and try to get some more feedback from folks to see how they intend to use it.

    Plugin Author Rich Tape

    (@iamfriendly)

    And just to close the loop here Karl, version 0.2.5 of Content Visibility contains the ability to show/hide widget blocks on posts that are tagged or categorized in terms of your choosing. (And also verifies compatibility with WordPress 5.8.0)

    Thread Starter Karl Andersson

    (@swekarl)

    Thanks for updating! I wanted to try it out again, but I don’t see any Visibility tab for blocks on the Widgets page (using Gutenberg widgets). I do see it for blocks in a regular post, but even there I only see one choice: User Authentication (logged in or not) – I don’t see any other options! Am I missing something? I have the Gutenberg plugin installed.

    Plugin Author Rich Tape

    (@iamfriendly)

    One of us is missing something and it isn’t you 😉

    I just pushed 0.2.6 which fixes the issue of the block controls not showing on the WordPress 5.8 widgets screen. Thank you for helping me catch that!

    As for the other options: they’re separate add-ons. This helps reduce the cognitive load for people – you only need to install the add-ons which you will use and therefore don’t have to worry about seeing lots of controls that you won’t ever need, and it also allows me to not have any plugin options; stuff just works out of the box… he says… after it didn’t work out of the box, haha.

    Here’s a link to all the available add-ons:

    https://wordpress.org/plugins/content-visibility-date-and-time/
    https://wordpress.org/plugins/content-visibility-geolocation/
    https://wordpress.org/plugins/content-visibility-rss-feed/
    https://wordpress.org/plugins/content-visibility-user-role/
    https://wordpress.org/plugins/content-visibility-specific-users/

    SarahDn

    (@sarahdn)

    Hi Rich @iamfriendly

    I have the same issue (hence continuing this thread) of wanting to show Widgets (now blocks) only on certain:
    – urls (posts or pages)
    – product categories

    My ‘visibility’ option is only showing for logged in/ out users.
    I don’t think the add-ons you list above, apply to showing widget blocks on specific pages?

    How can I get this to work?

    I have most recent versions of WP & Gutenberg

    Sarah

    Plugin Author Rich Tape

    (@iamfriendly)

    Hi Sarah,

    Are you using version 0.2.6 of Content Visibility? And do you see the new widgets screen when you visit Appearance > Widgets?

    If so, you should see a ‘Special Pages’ control for Widgets which will allow you to specify some posts and/or pages. Product categories isn’t something supported right now (as that’s a custom taxonomy), but I’m working on deeper integration with 3rd-party plugins such as WooCommerce which will include things such as this.

    Rich

    Plugin Author Rich Tape

    (@iamfriendly)

    Hi Sarah (and Karl!)

    There were some potential situations where the ‘Special Page’ controls weren’t showing on the new WordPress 5.8 widgets screen.

    I’ve just pushed version 0.2.7 which fixes those cases.

    Thanks for helping me improve the plugin!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.