I need you, Waqar!
All is well with Operating Hours, but...
It's showing on a post type that it's not assigned to, I can't figure it out, and I can't get rid of it!
Can you help?
Hello and thank you for contacting Toolset support.
Waqar does not work on weekends. If you would prefer him to continue with you, let me know, and I'll transfer this thread to him.
However, either he or I will need more details to help you. What post type are you talking about? Can you share a screenshot to help us understand what do you mean? Maybe a URL where we can see this issue on the front-end?
Hi, Jamal! I'd prefer to continue with Waqar, as he knows the issue. Please transfer to him. Thank you!
Hi,
Thank you for contacting us and I'd be happy to assist.
Can you please share temporary admin login details, along with the link to an example page where these operating hours shouldn't be showing?
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Thank you for sharing these details.
I've noticed that your website already has the "Widget Logic" plugin which allows you to show/hide a specific sidebar widget, based on a condition.
( the list of WordPress conditional tags can be seen at https://codex.wordpress.org/Conditional_Tags )
You'll see a widget logic field to enter a conditional tag under each widget.
( screenshot attached )
For example, suppose you'd like to show a specific widget only on specific single post pages for the post types "shop", "abc", and "xyz". The condition, in this case, would look like this:
is_singular( 'shop, abc, xyz' )
Inversely, suppose you'd like to hide a specific widget from the single post pages for post types "summer-camp", "abc", and "xyz". The condition, in this case, would look like this:
(!is_singular( 'summer-camp, abc, xyz' ))
I hope this helps and please let me know if you need any further assistance around this.
Fantastic, works! Any idea why this happened in the first place? Thank you very much.
Thanks for the update and glad that it worked.
Your active theme shows the sidebar named "Shop Sidebar" on the single post pages for the "Shop" and "Summer Camp" (and possibly other) post types.
Using conditional logic, you are able to show/hide individual widgets from that sidebar based on the post type.
I'm confused. How are the sidebars named 'summer camp' and 'shop' showing on the summer camp post type? Isn't happening with any other sidebar/post types.
The sidebar named "Shop Sidebar" is showing on the single post pages for the "Shop" and "Summer Camp" posts because in the single page template files of these post types it is being called:
dynamic_sidebar( 'shop-sidebar' );
Screenshot from the "single-shop.php" file:
hidden link
Screenshot from the "single-summer-camp.php" file:
hidden link
If your goal was to show the sidebar named "Summer Camp Sidebar" on the single "Summer Camp" posts, then you'll need to change that sidebar's name in the template:
dynamic_sidebar( 'summer-camp-sidebar' );
Oh Good Lord I'm an idiot. Thank you so much, I love you, Waqar!
Glad that I was able to help 🙂
You're welcome to mark this ticket as resolved and start a new one for each new question or concern.
My issue is resolved now. Thank you!