WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Shortcode rewrites slug and Custom fields of host page (2 posts)

  1. LucasHall
    Member
    Posted 1 year ago #

    Hi Bill,

    Even though I think this plugin is a work of genius, I did find a funny (not really) bug that's happening.

    It's a complex issue, so here we go...
    I'm using the shortcode in the content editor of a Page. When I do so, after saving the Page, the slug and the Custom fields from the 1st item in the results are imported in the slug and custom fields of the host page. Weird, right?!?!

    For example: I have a Page called "State Laws". I have multiple posts describing those laws, such as "Alabama Landlord Laws", "Virginia Landlord Laws". I add [display-posts] to the content editor of "state-laws" page and then publish. When the edit page reloads, the slug field, and all of the custom fields have been changed. The Custom fields on "state-laws" are now the custom fields from "alabama-landlord-laws", and the slug field which use to read "state-laws" now says "alabama-landlord-laws".

    Any idea why this might be happening?
    Thanks,
    Lucas

    http://wordpress.org/extend/plugins/display-posts-shortcode/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm, the Display Posts Shortcode doesn't do any queries on the backend (when you save the post ) - only on the frontend (when the page is loaded). And even then, the post data is properly reset once the query is done.

    What other plugins are you running?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic