We're merging with GenerateBlocks! Learn more here.

[Resolved] when using author id in more settings – warning

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support when using author id in more settings – warning

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2712
    David
    Participant

    Hi there,

    I’m setting up a site in local development at the moment, so working in debuggging mode, and getting a warning when selecting an author id:

    urldecode() expects parameter 1 to be string, array given

    If i change line 184 of /plugins/wp-show-posts/wp-show-posts.php, to:

    $args[ 'author' ] = $author;

    it seems to resolve the issue. Is this ok to make this change, to get around the warning message?

    thanks for your help

    #2716
    Tom
    Keymaster

    Hi there,

    Same bug as here: https://wpshowposts.com/support/topic/wp-show-posts-author-id-attribute-not-applied/

    I’ve found a fix, but the update isn’t ready yet. Would you be comfortable editing the file if I tell you what to look for and what to change?

    #2719
    David
    Participant

    Hi Tom,

    cool that would be great, let me know what I need to do.

    kind regards,
    David

    #2729
    Tom
    Keymaster

    Cool.

    First, open the wp-show-posts.php file in wp-content/plugins/wp-show-posts

    Find: $args[ 'author' ] = array( $author );

    And replace it with: $args[ 'author' ] = $author;

    That should do it 🙂

    #2732
    David
    Participant

    Hi Tom,
    awesome that looks just like the change I made, so thanks for confirming that I got it right 🙂

    thanks for your help,
    kind regards,
    David

    #2735
    Tom
    Keymaster

    Awesome, no problem! 🙂

    #2752
    Drew
    Participant

    Bingo, that did the trick. I assume this edit will be rolled up into the next scheduled update so it will be fine to let that update overwrite this edit but thanks in advance for letting me know if that’s not the case.

    #2768
    Tom
    Keymaster

    Yep – it’s already been patched in the next version 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.