• Resolved cengolinov

    (@cengolinov)


    Hi,

    I would like to use flex post to organize my main page. But title of the category don’t have a link option. How can I add link to my title of the category.

    Please help

    JJ

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tajam

    (@tajam)

    Hi,

    If you use the regular widgets (not blocks), you can use this code in your theme / child theme:

    function mytheme_widget_title( $title, $instance, $id_base ) {
    	if ( 'flex-posts-list' === $id_base && ! empty( $instance['cat'] ) ) {
    		$title = '<a href="' . get_category_link( $instance['cat'] ) . '">' . $title . '</a>';
    	}
    	return $title;
    }
    add_filter( 'widget_title', 'mytheme_widget_title', 10, 3 );
    Thread Starter cengolinov

    (@cengolinov)

    Thank you Tajam,

    It’s working perfect ??

    Best

    JJ

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title of category’ is closed to new replies.