Skip to content
WJunction - Webmaster Forum

I need help with Conditional Tags

Status
Not open for further replies.
Hello guys,

Can someone give me a little help here?

I want to show a widget on all pages except in a specific page and on a specific custom post_type.

This is what I have to show in all pages except the page /videos/

PHP:
!is_page('videos') && $post==$posts[0] && !is_paged()

Is working great!
But how to hide in all post type "vrvideo" too?

I tried this but didn't worked:

PHP:
!is_page( array( 'videos', 'vrvideo' ) ) && $post==$posts[0] && !is_paged()

Probably is because I'm using is_page for "videos".
And "vrvideo" is a post type...

Any idea how to solve this? :)

Thanks in advance!
 

1 comment

Problem solved with the following code:

PHP:
!is_page('videos') && $post==$posts[0] && !is_paged() && !is_singular('vrvideo')

Thank you anyway :)
 
Status
Not open for further replies.

About the author

D
Active Member · Joined
806
Messages
18
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom