1899 posts Multimedia Artistry
  • Elite Author
  • 4 Years of Membership
  • Freebie
  • Most Wanted Winner
+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?

3804 posts
  • Power Elite Author
  • Author Level 12
  • Trendsetter
  • 7 Years of Membership
+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..

1899 posts Multimedia Artistry
  • Elite Author
  • 4 Years of Membership
  • Freebie
  • Most Wanted Winner
+4 more
dnp_theme
says

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

3804 posts
  • Power Elite Author
  • Author Level 12
  • Trendsetter
  • 7 Years of Membership
+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()

1899 posts Multimedia Artistry
  • Elite Author
  • 4 Years of Membership
  • Freebie
  • Most Wanted Winner
+4 more
dnp_theme
says

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

683 posts
  • 5 Years of Membership
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
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