Forum Replies Created

Viewing 1 replies (of 1 total)
  • It’s great to hear about your efforts to enhance your author page! Integrating your author box into the author page using the Astra theme is indeed possible without additional plugins.

    Since you already have a PHP function working for your posts, you can adapt it for your author page. You’ll want to hook into astra_author_header_after to display your author box just above the list of posts. Here’s a brief guide:

    1. Locate the function: Ensure your PHP function is in your functions.php file or within Code Snippets.
    2. Modify the function: Adjust it if needed to ensure compatibility with the author page.
    3. Add the hook: Use the astra_author_header_after hook to call your function.

    Here’s a basic example of how you can do it:

    function custom_author_box() {
    // Your existing code for the author box
    echo '<div class="author-box">';
    echo get_avatar(get_the_author_meta('ID'), 96);
    echo '<p>' . get_the_author_meta('description') . '</p>';
    echo '</div>';
    }
    add_action('astra_author_header_after', 'custom_author_box');

    This should place your author box above the list of posts on your author page.

    Remember your bio should be your true representative and show some unique features to be interesting for the users. Besides the author’s bio same is the case for your social media profile’s bio. For example, I recommend using a decent style for Instagram bio that offers inspiration and looks attractive for more users engagement.

    I hope this helps! Let me know if you need any more assistance.

    Thanks in advance.

Viewing 1 replies (of 1 total)