WordPress.org

Ready to get started?Download WordPress

Forums

How to add shortcode tag in Category title ?? (1 post)

  1. mejibaba
    Member
    Posted 2 years ago #

    Assalam-o-Alaikum

    i want to change the specific letters color of category title using shortcode tag like as following
    My [color]Category[/color]
    plz guide me,
    while i have written a function in functions.php as following
    <?php
    function caption_shortcode( $atts, $content = null ) {
    return '<span style="color:#F00; font-size:20px;">' . $content . '</span>';
    }
    add_shortcode( 'color', 'caption_shortcode' );
    ?>
    plz tell me, how can i enable shortcode in category title ???

Topic Closed

This topic has been closed to new replies.

About this Topic