1 Comment
  1. Can you show the code you’re using? get_post_type(); is exactly what you want here and works everywhere.

    To verify I wasn’t misremembering I just tossed a call in my footer for it and it prints out the proper post type of every area of my site. Page, Post, Custom Post TYpes, etc.

    So there must be something else going on with your code.

 

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