• 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

Create Author clickable link and author archive for pages

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 › Design Tips and Tricks › Create Author clickable link and author archive for pages

This topic is: not resolved

Tagged: page

  • This topic has 2 replies, 2 voices, and was last updated 5 years ago by sandnsurf.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 29, 2017 at 9:39 pm #214126
    sandnsurf
    Member

    Using magazine Pro for website
    Have 50 authors mainly working on pages
    Trying to create same post_meta for pages as per posts so (written by [author]) is at the top of every page.
    Then trying to get the author archive page to display the pages as well as the posts for each author
    Any suggestions greatly appreciated.
    Mike

    https://lifeinthefastlane.com
    March 9, 2018 at 9:37 am #217589
    Christoph
    Member

    Hi Mike,

    Sorry, that your post didn't receive a response sooner.
    The posts on this forum are mostly answered by volunteers and sometimes questions get pushed out-of-view.

    I hope you already found a solution.

    Here is a tutorial for adding post types to the author's archive: https://isabelcastillo.com/add-custom-post-types-to-author-archives-wordpress
    Just add page to the post type array.
    And Brad has a tutorial for adding post info to pages: https://wpsites.net/web-design/post-info-on-pages-genesis/


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    March 9, 2018 at 9:18 pm #217686
    sandnsurf
    Member

    Thank you Christoph

    I have added the 'Brad Dalton' code to functions.php and now have post author data displayed, thank you

    Updated the 'Isabel Castillo' code adding page to array - and now have the author pages and posts displayed on the author archive page.

    add_action( 'genesis_entry_header', 'add_post_info_pages' );
    function add_post_info_pages() {
    if ( is_page() ) {
    $post_info = 'by [post_author_posts_link], Last updated [post_modified_date] [post_edit]';
    printf( '<p class=”entry-meta”>%s</p>', do_shortcode( $post_info ) );
    }
    }

    function custom_post_author_archive($query) {
    if ($query->is_author)
    $query->set( 'post_type', array('page', 'post') );
    remove_action( 'pre_get_posts', 'custom_post_author_archive' );
    }
    add_action('pre_get_posts', 'custom_post_author_archive');

    Thank you again

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2023 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