Plugin Contributor
satrya
(@satrya)
Hello,
By default the title should linked to the single post.
Thread Starter
smcrmo
(@smcrmo)
Yes, the title of the post links to the post, however, what I mean is the title of the widget. For example, I’m using the widget to display random posts of vacation rentals. You can see it on my site. In the lower part of the front page is Advanced Random Posts Widget with the title tag “Great Tamarindo Vacation Rentals”. That text is what I put into the Title field of the widget. I would like to be able to have that text link to a page with all of the vacation rentals. There are a couple of widgets in the upper part of the page that have the function I’m talking about, however, these are built into the theme and there is no option to have them list randomly.
Plugin Contributor
satrya
(@satrya)
Thread Starter
smcrmo
(@smcrmo)
I’ve added that plugin and it works other widgets I have, but not with Advanced Random Posts. I’ve tried it on several implementations I’m using of Advanced, but none of them are working with the widget title links widget.
The FAQ for the widget title links says that a widget must use the widget_title filter or it won’t work. I’m not sure if Advanced uses that filter.
Thread Starter
smcrmo
(@smcrmo)
Looking through widget-advanced-random-posts.php I find $title = apply_filters( 'widget_title', $instance['title'] );, but I can’t see why widget-title-links wouldn’t work with this. I’d really like to get this to work, this is a great solution for me.
Thread Starter
smcrmo
(@smcrmo)
I tried ARPW on my other WP testing site, which has a different theme, but it doesn’t want to work there either. I can’t figure this out.
Plugin Contributor
satrya
(@satrya)
Hmm.. weird, I’ll try it in my local host.
Plugin Contributor
satrya
(@satrya)
I just tried and it works Sir http://d.pr/i/Wpg8
Plugin Contributor
satrya
(@satrya)
Ok, I just figured out the issue, for now please change
$title = apply_filters( 'widget_title', $instance['title'] );
With this one
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
Thread Starter
smcrmo
(@smcrmo)
That did the trick, thanks so much! Works perfectly now.