WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Fields (3 posts)

  1. dadvan
    Member
    Posted 1 year ago #

    How can I pull in the values from my custom field in a Page to be shown here:

    <form method="get" id="search form" action="/">
    <div>
    <input type="text" value="" name="s" id="s" />
    <input type="hidden" value="CUSTOM FIELD VALUE HERE" name="cat" id="scat" />
    <input type="submit" id="search_submit" name="Search" value="Search"/>
    </div>
    </form>

    Ultimately, I am trying to have a dynamic search to query from within a tag or set of tags that are defined in the page's custom fields (related_tags).

  2. jonradio
    Member
    Posted 1 year ago #

    If you are up to coding PHP, then you can use the function shown here: http://codex.wordpress.org/Function_Reference/get_post_meta

    If you prefer a shortcode, there are numerous plugins that will give you a shortcode to display a given custom field on a page, such as this one:
    http://wordpress.org/extend/plugins/get-custom-field-values/

  3. dadvan
    Member
    Posted 1 year ago #

    I am scratching using the custom field. Thanks for the reply!

Topic Closed

This topic has been closed to new replies.

About this Topic