• Resolved belleve

    (@belleve)


    Would anyone be able to help me? I have a custom post type, I have put the below code in my functions.php file (via code snippets) and it works fine showing the recent posts in the standard recent post wordpress widget but I cannot get it to show in the REIGN News Widget Latest Posts one. I assume I need to change one of the parameters to point towards using this widget… maybe?

    add_filter('widget_posts_args', 'add_custom_post_type_to_recent_posts'); 
    function add_custom_post_type_to_recent_posts($params) {   $params['post_type'] = array('post','blog');
       return $params;
    }

    You can see what I mean looking on the right sidebar on this page https://bellevebricks.co.uk/blog/. The one that says “Recent” at the bottom is me testing that the code I put in works with the default wordpress widget.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Impossible for me to say as I’m not familiar at all with this “REIGN News Widget Latest Posts” widget and what all may be available to it. Your best bet is going to be reaching out to the developer(s) of where you got the widget from, and see what they have to say about it.

Viewing 1 replies (of 1 total)
  • The topic ‘Cannot get CPT posts to appear in REIGN recent posts widget’ is closed to new replies.