• Mark

    (@markhenderson)


    I need to use the shortcodes to duplicate the functionality of the widget form. In the widget form, I can choose multiple post_types. E.g. Posts AND Pages.

    What is the shortcode for this?

    • For posts only, I think the shortcode is post_type="post".
    • For pages only, the shortcode is post_type="page".

    What is the shortcode for including both pages and posts?

    Thanks for your help.

    https://wordpress.org/plugins/recent-posts-widget-extended/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ga Satrya

    (@satrya)

    Hi Mark,
    For now, it’s not possible to have multiple post types in the shortcode. But, I’m still improving the shortcode function, I hope it’ll be ready soon.

    Thanks,
    Satrya.

    Thread Starter Mark

    (@markhenderson)

    Thank you, Satrya. I like your plugin.

    Any chance this will be implemented in the future? Dying for this feature.

    Wouldn’t work for everyone’s needs, but did in my case.

    add_filter( 'rpwe_default_query_arguments', 'dw_news_post_types' );
    function dw_news_post_types( $args ) {
        $args['post_type'] = array('post','news'); // Changing the number of posts to show.
        return $args;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘What is the shortcode for multiple post_types’ is closed to new replies.