WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] edit-pages and edit-posts show both pages and posts (2 posts)

  1. spacechampion
    Member
    Posted 4 years ago #

    I just finished creating my first plugin, and its for a client (took a full week for little money, but worth it to get that under my belt!).

    It finally (after struggling with why get_post_meta wasn't working) works perfectly except for this little problem --- both the edit-pages and edit posts admin pages both now display both pages and posts.

    In my plugin I used query_posts('post_type=any') to grab both pages and posts so I can grab the custom meta fields of each and produce an xml sitemap for videos. I assume this is why my problem with the admin pages comes up, but does any body know why?

  2. spacechampion
    Member
    Posted 4 years ago #

    I'm wondering if I can use is_plugin_page() to prevent this? Is there a parameter to specify a particular plugin?

    Better yet would be to use a function that checks if a particular admin page is called. Is there a hook for that?

Topic Closed

This topic has been closed to new replies.

About this Topic