Ready to get started?Download WordPress


Yet Another Related Posts Plugin (YARPP)
[resolved] Custom Post Type support on Widget (4 posts)

  1. rumeau
    Posted 1 year ago #

    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.


  2. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 1 year ago #

    Does your custom post type have yarpp_support set to true, as discussed in the readme?

  3. rumeau
    Posted 1 year ago #

    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.


  4. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.