• Resolved jeffhunzukio

    (@jeffhunzukio)


    Hi,

    first of all thank you for this nice plugin,

    I’d like to know if there is any way to display the author name automatically in a post using the loop / in archive page.

    Since the name is stored as a custom field I already tried for hours everything from the codex/forums, however, my theme doesn’t display custom fields. Also, within the archive page this would not display different author names, as far as I know.

    Do you know any other solution instead of pasting the name manually into the post every time?

    Thank you!

    Jeff

    https://www.ads-software.com/plugins/accesspress-anonymous-post/

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

    (@jeffhunzukio)

    found a workaround using https://www.ads-software.com/plugins/custom-fields-shortcodes/
    and <?php echo do_shortcode(‘[cf-shortcode plugin=”generic” field=”ap_author_name”]’);?>

    Plugin Author Access Keys

    (@access-keys)

    Hi there,

    That’s great news that you found a workaround.

    And thank you for liking our plugin.

    But we do have some standard method for displaying custom fields.There is some coding required for displaying custom fields in loop/in archive page.

    Just use this code inside the loop where post is being fetched for displaying author details.

    <?php
    echo get_post_meta(get_the_ID(),'ap_author_name',true);//for author name
    echo get_post_meta(get_the_ID(),'ap_author_email',true);//for author email
    echo get_post_meta(get_the_ID(),'ap_author_url',true);//for author URL
    ?>

    The above code will let you to display the author details without needing to use any other plugin.

    And if you really liked our plugin then , please give us a rating here. ??

    Thanks.

    Thread Starter jeffhunzukio

    (@jeffhunzukio)

    Thanks for the code, this does the job, too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display author name’ is closed to new replies.