display-posts shortcode not working

  • I’m trying to use the display-posts shortcode, and it’s just…not doing anything. I’ve tried [display-posts category='whats-new' posts_per_page='10'] and [display-posts tag='whatsnew' posts_per_page='10'] (the post – currently there’s only one – that I want is both in that category, and has that tag). In both cases, nothing is displayed on the page. I’ve tested to see if shortcodes are actually being processed by including [notactuallyashortcode tag=’whatsnew’ posts_per_page=’10’] on the page, and that just gets displayed as text, so clearly the display-posts shortcode IS being recognized, it’s just not working.

    Any suggestions? this has been driving me nuts the past two days.

    The blog I need help with is: (visible only to logged in users)

  • Hi @danringr,

    Can you share the url of your site? That one http://blog.ringr.com/ gives me a “no match” on whois (I was searching to see if its hosted here with us in WP.com).

    Have you tried the shortcode without anything on it [display-posts]?

    Let us know so we can further assist!

  • I’m also having this issue. I tried just the
    [display-posts]
    tag and nothing happened. Other shortcodes, such as [archive] work. Not sure what is happening here!

  • Just to add @danringr,

    If it’s a self hosted WordPress install, you need to add the plugin to your site. If it’s hosted with us at WordPress.com, it’s already included.

    If it’s the plugin itself that’s causing trouble you might want to go to their support page:
    https://wordpress.org/support/plugin/display-posts-shortcode

    The best place for asking about self hosted WordPress sites will be at WordPress.ORG:
    https://wordpress.org/support/

    Difference between WP.ORG VS WP.ORG
    https://en.support.wordpress.com/com-vs-org/

    I hope this points you in the right direction. Best Regards.

  • @afjhnsn,

    Can you post your own thread by going here: https://en.forums.wordpress.com/?new=1

    And be sure to add your blog’s url, this way we can give you proper support.

    Thank’s so much!

  • @solybarr,

    sorry for the confusion – it is hosted on WordPress.com, but the main ringr.com DNS is elsewhere. you can see this with nslookup:

    $ nslookup blog.ringr.com
    Server:		192.168.1.1
    Address:	192.168.1.1#53
    
    Non-authoritative answer:
    blog.ringr.com	canonical name = blogdotringrdotcom.wordpress.com.
    blogdotringrdotcom.wordpress.com	canonical name = lb.wordpress.com.
    Name:	lb.wordpress.com
    Address: 192.0.78.13
    Name:	lb.wordpress.com
    Address: 192.0.78.12

    I’ve just tried the [display-posts] shortcode with no arguments, and that is doing something (yay!). The page with it is at https://blog.ringr.com/whatsnew/.

    Thanks!

  • @solybarr,

    update! just after posting the above, I had a quick hunch and tried it without quotes around the shortcode arguments:

    [display-posts category=whats-new posts_per_page=10]

    instead of

    [display-posts category="whats-new" posts_per_page="10"]

    and it works! this is great, but the shortcode documentation at https://en.support.wordpress.com/display-posts-shortcode/ includes the quotes around the arguments which is why I included them in the first place. the shortcode plugin should probably be fixed to not be thrown off by the quotes, or the docs should mention this issue.

    Thanks again, I think this will take care of my issue!

  • @danringr,

    Ok that’s great news, so we know Display Shortcode is working!

    That is weird about the double quotes. I will do some tests in my site and report it if that’s the case. Thank you.

    Let us know if you need additional help.

  • The topic ‘display-posts shortcode not working’ is closed to new replies.