Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Yes, you can pull in custom fields.
    You likely need to declare global $post at the top of your Easy Query template.

    Thread Starter Zenbirdy

    (@zenbirdy)

    Do you have an example or documentation?

    What I want to achieve is to display the custom fields I add to a custom post type in the frontend.

    I’ve been playing with the plugin, copy pasted the template into my functions php but, the fields doesn’t appear.

    Thanks in advance

    Plugin Author Darren Cooney

    (@dcooney)

    What do you mean by

    ‘copy pasted the template into my functions php’

    ?

    In order to get your custom fields from your CPT you would do this.

    <div>
    <?php global $post; ?>
    <h1><?php the_title(); ?></h1>
    <p>Custom field: <?php get_post_meta($post->ID, 'key_name'); ?></p>
    </div>

    key_name is the name of the custo field.
    Does that make sense?

    Thread Starter Zenbirdy

    (@zenbirdy)

    Thanks ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘show custom fields’ is closed to new replies.