How do I display category description for images and authors?

How do I display the category description, category images and author description on Upfront (bio)?

  • Daniel Berhane
    • Site Builder, Child of Zeus

    Hello Predrag,

    I am not sure I understand your question.

    I want category descriptions to be displayed on top of category pages:

    for example, mysite.com/category/country/kenya/

    The same goes for author pages and tag pages.

    What other options are there?

    Are you referring to the post-list function of upfront theme or some other common feature?

    Thanks.

  • Dimitris
    • Support Star

    Hey there Daniel Berhane,

    hope you’re doing good today and don’t mind me chim in here! :slight_smile:

    You can use the Upfront Builder plugin to create separate layouts for category archive and tag archive pages, still, there’s no easy way to insert the corresponding descriptions.

    Doc pages: https://premium.wpmudev.org/docs/upfront-and-themes/using-the-upfront-builder/

    This would be a nice addition, along with an Author page layout, as it also doesn’t exist in the available layouts in Upfront Builder, so we can move this to our Features & Feedback section of our forums, in order to engage more members (more members upvoting, is always a plus for us!) and also notify the rest of our team (project managers, devs etc) on this.

    Finally, you can use a workaround on this, which includes some PHP in order to build the appropriate shortcodes, in order to use inside the category and tag layouts.

    I tested that by creating a little MU plugin, like in a /wp-content/mu-plugins/tax-description.php file (simply create the /mu-plugins/ folder if doesn’t exist) and in there I used:

    <?php
    function show_current_taxomony_description() {
    $string = '<ul>';
    $term = get_term_by( 'term_taxonomy_id', get_queried_object_id() , get_query_var( 'taxonomy' ) );
    $string .= $term->description;
    $string .= '</ul>';

    return $string;
    }
    add_shortcode('tax_descr', 'show_current_taxomony_description');

    I could then edit the category and tag layouts and insert a Text element, in where I inserted

    [tax_descr] to get the taxonomy description.

    Hope that was some help!

    Warm regards,

    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.