WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Featured Widget Amplified
Feature request - make widget title a link (solution) (2 posts)

  1. unick69
    Member
    Posted 4 months ago #

    I saw this post and thought I'd share a quick fix.
    http://wordpress.org/support/topic/plugin-genesis-featured-widget-amplified-feature-request-make-widget-title-a-link

    add these lines to the widget.php file

    to the function __construct in the Genesis_Featured_Widget_Amplified class (near line 50)

    add this

    'title_url' => '',

    in function widget( $args, $instance ) (near line 133)

    just under

    /** Merge with defaults */
    $instance = wp_parse_args( (array) $instance, $this->defaults );

    add

    if( !empty($instance['title_url']) ) {
        $before_title_url = '<a href="'.$instance['title_url'].'">';
        $after_title_url = '</a>';
    }

    and modify the

    echo $before_title . apply_filters( 'widget_title', $instance['title'] ) . $after_title;

    as follow

    echo $before_title . $before_title_url . apply_filters( 'widget_title', $instance['title'] ) . $after_title_url . $after_title;

    and in the function form($instance) (near line 321)

    add this to the columns array

    'title_url'  => array(
                     'label'       => __( 'Title URL', 'gfwa' ),
    		 'description' => 'Set the link of the title of this widget',
    		 'type'        => 'text',
    		 'save'        => true,
    		 'requires'    => '',
    ),

    You should now have a new box in the widget area, just type in the url of the title in and you should be all set

    https://wordpress.org/plugins/genesis-featured-widget-amplified/

  2. healthable
    Member
    Posted 4 months ago #

    Thanks

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.