WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] display post with custom fields (3 posts)

  1. 3v1l5w1n
    Member
    Posted 5 years ago #

    I have some posts that have custom field "myField" set to value "true". I know how to display such posts (inside a loop I can use get_post_meta to find all posts that have "myField" set to "true"). Now suppose I create customFieldPosts.php which will execute such loop. I would like to put a link into my sidebar "myblog.com/myField/true".

    How do I redirect the trafic (from the index.php in wp root folder) to my the customFieldPosts.php sending along "myField" and "true" as query parameters.

    Thank you

  2. 3v1l5w1n
    Member
    Posted 5 years ago #

    bump ...

  3. 3v1l5w1n
    Member
    Posted 5 years ago #

    I guess the answer is in Template Hierarchy

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.