Page/Post conditions? | WordPress.org

[ad_1]

Hi @ashf,

What do you have in mind? Are you wanting to show/hide blocks based on the page/post ID? Or something else?

Thread Starter
ashf

(@ashf)

Yes, it would be post id or url I think.
Widget Options has the option to show/hide on certain pages/posts.
(But does not work with blocks)

Hey @ashf,

I think this is a great idea. I went ahead and added two new conditions: one to check the page/post ID and another to check the slug.

If you need to check another page/post property, you can always add a user-defined function condition and write a function that returns the value you want to test.

I hope this helps! I’m marking this as resolved but feel free to continue the thread if you still have issues.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer