• Resolved Mindaugas Dev

    (@mindaugas-dev)


    First of all thanks for such a wonderful theme!

    I would like to show tag description on each tag page top. Please let me know how to do it in correct way?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Richie KS

    (@rkcorp)

    try add this to theme functions.php or wp-content/meso-custom-functions.php if you created one.

    <?php
    //category description
    function dez_add_cat_desc() {
    $get_catdesc = category_description(); if($get_catdesc):
    echo '<div style="margin:-20px 0 0 0;" class="catdesc">'.$get_catdesc.'</div>';
    endif;
    }
    add_action('bp_after_headline', 'dez_add_cat_desc');
    
    // tag description
    function dez_add_tag_desc() {
    $get_tagdesc = tag_description(); if($get_tagdesc):
    echo '<div style="margin:-20px 0 0 0;" class="tagdesc">'.$get_tagdesc.'</div>';
    endif;
    }
    add_action('bp_after_headline', 'dez_add_tag_desc');
    ?>
    Thread Starter Mindaugas Dev

    (@mindaugas-dev)

    doesn’t work ??
    seems like hook function do_action(‘bp_after_headline’) located on mesocolumn\lib\templates\headline.php is never executed at all. I tried manually replace it with echo “test” but nothing happens.

    Theme Author Richie KS

    (@rkcorp)

    working fine to me, although you just need this only, no need for the dez_add_tag_desc().

    <?php
    //category description
    function dez_add_cat_desc() {
    $get_catdesc = category_description(); if($get_catdesc):
    echo '<div style="margin:-20px 0 0 0;" class="catdesc">'.$get_catdesc.'</div>';
    endif;
    }
    add_action('bp_after_headline', 'dez_add_cat_desc');
    ?>

    check demo
    //demo.dezzain.com/tag/designs/
    //demo.dezzain.com/category/featured/

    it show the description after i add the code.

    Theme Author Richie KS

    (@rkcorp)

    make sure you’re using the latest v1.6.4.1 like demo do.

    Thread Starter Mindaugas Dev

    (@mindaugas-dev)

    I’ve found a problem. I don’t use archive headings (disabled via theme options). When I enable it descriptions shows up (archive header too).

    Is it possible to display only tag/category description without archive header?

    Theme Author Richie KS

    (@rkcorp)

    try change
    add_action(‘bp_after_headline’, ‘dez_add_cat_desc’);
    to
    add_action(‘bp_before_blog_home’, ‘dez_add_cat_desc’);

    Thread Starter Mindaugas Dev

    (@mindaugas-dev)

    Works! Needs some text styling, but I will do it myself ??

    Thanks Richie!

    Hi, Richie!

    Please, help me to make styling of tag description box on page top, like you did on demo.dezzain.com/tag/designs/

    Best Regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show tag description on tag page’ is closed to new replies.