1896 posts Multimedia Artistry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Contributed a free file of the month
  • Won a Most Wanted contest
+4 more
dnp_theme
says

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

3802 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Had an item that was trending
  • Has been part of the Envato Community for over 7 years
+12 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..

1896 posts Multimedia Artistry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Contributed a free file of the month
  • Won a Most Wanted contest
+4 more
dnp_theme
says

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

3802 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Had an item that was trending
  • Has been part of the Envato Community for over 7 years
+12 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()

1896 posts Multimedia Artistry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Contributed a free file of the month
  • Won a Most Wanted contest
+4 more
dnp_theme
says

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

683 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
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