WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to determine if post.php (dashboard) is custom post type? (2 posts)

  1. wzshop
    Member
    Posted 1 year ago #

    Hello,
    How can i determine through coding if a post.php is requested by a custom post type?

    The "add new" option says &post_type=. But when i want to edit posts in my custom post type, no such thing can be found in the URL. I already have this code

    if(($pagenow == 'post.php' || $pagenow == 'post-new.php') && $post->post_type=='blog')

    How to check it for post.php?
    Thanks

  2. wzshop
    Member
    Posted 1 year ago #

    Sorry, this just seemed to work all along:) So use it if you like;)

Topic Closed

This topic has been closed to new replies.

About this Topic