• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to show custom field information on Archive page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to show custom field information on Archive page

This topic is: not resolved

Tagged: Custom fields

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 3 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 23, 2018 at 6:10 pm #223932
    sstoker
    Member

    Hello all,

    I have bumped into an issue I am not able to resolve and I'm hoping that perhaps someone here can point me in the right direction. I've built a site (hardcrackers.com) using the genesis sample child theme. The site is for a political journal and the posts are articles written by numerous different people. However, there are just three of us that actually post those articles on the site. To prevent the author field on each of the articles constantly showing the name of the posters, rather than the actual authors, I made a custom field, using the following code in my functions.php file.

    /*Add guest-author custom field*/
    add_filter( 'the_author', 'guest_author_name' );
    add_filter( 'get_the_author_display_name', 'guest_author_name' );
    function guest_author_name( $name ) {
    global $post;
    $author = get_post_meta( $post->ID, 'guest-author', true );
    if ( $author )
    $name = $author;
    return $name;
    }

    This has worked great for this particular problem. However, I am currently building the archive page and I'd like to show a list of the authors whose names were entered into the custom fields that links to a page with everything they have written. I've researched the matter a bit and am unable to find any sort of solution thus far. Does anyone out there have any ideas of how best to solve this?

    Thanks in advance!

    Best,

    Sam

    https://hardcrackers.com
    October 24, 2018 at 12:35 am #223934
    Brad Dalton
    Participant

    This is not a archive page in the sense it doesn't use the WordPress Template Hierarchy to load the page.

    What you're doing is creating a custom page template were you want to list authors with a link to their posts.

    If its only 3 authors you can hard code the links.

    If its dynamic, you can use wp_list_authors

    or you can use get_users
    or you can use WP_User_Query


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble