• Resolved rumeau

    (@rumeau)


    Hello, i’m implementing YARPP on a new blog site, the problem is that it looks like the widget only supports post, page and cross_relate for post_type leaving me with no support for the custom post type selected on the main settings.

    My solution was to hack the widget class, and add this support, it would be nice to merge this to the plugin.

    on file class-widget.php i added after line 27

    else if ( in_array(get_post_type(), $yarpp->get_post_types()) )
    	$instance['post_type'] = array( get_post_type() );

    This will give support for custom post types on the widget.

    https://www.ads-software.com/extend/plugins/yet-another-related-posts-plugin/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Does your custom post type have yarpp_support set to true, as discussed in the readme?

    Thread Starter rumeau

    (@rumeau)

    Yes, and i check that it works because i can see my custom post type available for selection on the plugin settings page.

    It was only the widget where it wasn’t showing.

    I’m not sure if this happens only to me, in that case it may be an error on my setup.

    Thanks.

    Alright, I just reviewed the widget display code and you are entirely right. The fix you suggested in class-widget.php will be in the next version of YARPP. The fix is in this new beta, 4.0.4 beta 2.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Type support on Widget’ is closed to new replies.