Linking the title in the feature page widget

Community Forums Forums Design Tips and Tricks Linking the title in the feature page widget

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Sridhar Katakam 4 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #77237

    mediastead
    Member

    Hello,

    I am trying to filter the title of the featured page widget to return the title with the same link as the image has. I am a bit stuck, and was hoping to some assistance. I have the following so far:

    add_filter( 'widget_title', 'hvw_linked_widget_title', 10, 1);
    
    function hvw_linked_widget_title($value){
    	return '<a href="' . get_permalink() . '">' . $value . '</a>';
    }
    

    The issue is that this widget pulls whatever page you choose within the widget, and so it knows the link because it is coded that way. I am using a filter that has no reference of the other information in the widget … just the title, because that is the filter I am using.

    Any thoughts?

    Thanks!

    #77656

    Sridhar Katakam
    Participant
    Post count: 841

    In ‘Genesis – Featured Page’ widget, if you tick “Show Page Title”, it does show the linked Page title below the image.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.