WordPress.org

Ready to get started?Download WordPress

Forums

Problem with WordPress recognizing my Custom Post Type (1 post)

  1. mattloak
    Member
    Posted 3 years ago #

    I registered a custom post type "lom_video" and all appears to be working well except for one thing. I was troubleshooting why a conditional tag wasn't working so I put this code into the post template to make sure wordpress was recognizing the post type:

    <?php echo get_post_type(); ?>

    It should display "lom_video" but instead it displays "post". All other indications show that it recognizes it as "lom_video"...

    1. It's using the custom post template I set for lom_video
    2. Published posts are using the proper url structure I set for this type of post
    3. When I preview a draft the url ends with:
    "?post_type=lom_video&p=10374&preview=true"

    but for some strange reason when I have it display the post type it says it's a "post."

    What's going on here?

Topic Closed

This topic has been closed to new replies.

About this Topic