1673 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

How do you know you are on a page or page template with a certain custom post type loop in it?

3430 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

How do you know you are on a page or page template?

Through css/js? The body has a custom class of the id or the page template.

Through php/wp? is_page_template()

Honestly i didn’t understood the second part of the question..

1673 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

You are on a page with “events” post type loop. How do you detect/define that with PHP?

3430 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

Are you using archives? Are you using page templates? There are a lot of factors in your questions.. If you’re using page templates i just gave you the answer above. If you’re using archives, check out is_post_type_archive()

1673 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

I am actually using the page.php with a content type loop inside.

612 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
ChapterThemes says

is_page() : http://codex.wordpress.org/Function_Reference/is_page

get_post_type : http://codex.wordpress.org/Function_Reference/get_post_type

or use the global $post; and $post->post_type to get the post type.

Maybe these are of use!

by
by
by
by
by
by