Support » Theme: Customizr » Link featured page titles to another page

  • Hi Guys,

    Is there a way to make the title of my featured pages on the front page link to another page? I know the images link but I can not get the titles to link. I would also like to add a hover color the those titles too.

    Thanks heaps.

    Bol

Viewing 5 replies - 1 through 5 (of 5 total)
  • You’d need to add php in your child theme’s functions.php to do this. Here’s mine:

    // Add a link to featured pages titles
    add_filter('tc_fp_single_display', 'add_title_link', 20, 6);
    function add_title_link($html, $fp_single_id, $show_img, $fp_img, $featured_page_link, $featured_page_title){
    	$link = '<a href="'.$featured_page_link.'">'.$featured_page_title.'</a>';
    	return str_replace('<h2>'.$featured_page_title.'</h2>', '<h2>'.$link.'</h2>',$html);
    }

    To change the hover/active/focus colour, use:

    .widget-front > h2:hover, .widget-front > h2:active, .widget-front > h2:focus {
        color: red; /* or whatever */
    }

    in your child theme’s stylesheet.

    Thread Starter bolsta

    (@bolsta)

    Thanks for that. Sorry for the late reply have been over seas

    Thread Starter bolsta

    (@bolsta)

    Hi ElectricFeet,

    I have been trying to figure this one out but can’t get it sussed. Could you break it down in laymans terms for me please?

    Thanks mate.

    Bol

    @ef not around at moment.

    The #1 snippet needs to be added to a Child Theme functions.php. Read here if you don’t understand.

    The #2 snippet needs to be added to a CT style.css, or Custom CSS

    Thread Starter bolsta

    (@bolsta)

    Thank you rdellconsulting. I will have a read of the link.

    Cheers.

    Bol

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Link featured page titles to another page’ is closed to new replies.