• Resolved writer-joan

    (@writer-joan)


    I figured out how to add the custom fields to my widget thanks to your great support. But when I fill them out as a guest they appear in the post. The WP custom field instruction for editing the php Loop is confusing to me.

    Is showing the custom field in posts automated for the widget or do I need to code? Is there a simple answer as to what and where I place the code so the custom fields will show individual answers with the posts?
    Many thanks for this plug in. And yes, you have been given a 5 star rating from me! ??

    Joan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter writer-joan

    (@writer-joan)

    Thanks Perry for your e-mail support.

    Here’s the answer…

    Look for the “Post Meta” (or preferred location) section in the index.php file

    To include all custom fields in no order that posts the name and the value use:

    <?php the_meta(); ?>

    To post individual custom values use:

    <?php $key="REPLACE W/KEY NAME"; echo get_post_meta($post->ID, $key, true); ?>

    This will ignore any custom fields that do not have a value.

    I replaced my theme’s “author” with this tag so I now have the byline as the custom field “name” from the form instead of “Guest.” Very cool!

    These fields are not showing on the individual post pages yet, just the blog page. That’s next lesson…

    Plugin Author inapan

    (@inapan)

    Hi Joan,

    Thanks for sharing!

    inapan

    Hi,
    it’s possible to add a nickname field were guest can put his nickname, and after submit the default author change to the nickname.

    and wat’s about a email notification to the guest after admin moderation.

    tnx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show custom fields on posts’ is closed to new replies.