Querying page tags

  • Hi!
    I just used the following code to add tags to my pages:

    function add_tags_to_pages() {
        register_taxonomy_for_object_type('post_tag', 'page');
    }
    add_action('init', 'add_tags_to_pages');

    I’d like to now be able to set up a query using these tags, but I don’t see that as an option under the post query parameters. Is there a way to add this?

    Thanks!
    Elisabeth

  • Hi Elisabeth,

    You’ll need to select Taxonomies as the parameter first. Then in the Taxonomies field, choose Tags.

  • Thanks! I knew I was missing something simple.

  • No problem!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.