TPG Get Posts
[resolved] authors option does not work (5 posts)

  1. cdaley1981
    Posted 5 years ago #

    the authors option does not seem to work by default. I was able to add the code "authors => ''," onto line 163 of the tpg-get-posts.php file and it then worked correctly. Looking at the code there, does this plugin really accept all options that get_posts() accepts? or just the ones that are listed in the array starting on line 161?

  2. cdaley1981
    Posted 5 years ago #

    how I am using this:
    [tpg_get_posts fields="post_title" author="-270" ]
    to exclude an authors posts

  3. cswaim
    Plugin Author

    Posted 5 years ago #

    Well, the plug-in was supposed to support most of the options, but as I got into it I ran out of time and actually forgot about it. So you were able to add the option and it works, so for now, this is a good reference to others who need to add options.

    I will try to add the options in the next release. Thanks for the feedback and my apologies for the misleading doc.

  4. cdaley1981
    Posted 5 years ago #

    Not a problem, and thanks for being open to adding it! That would really help so it doesn't break when we update the plugin in wordpress. I guess i thought it would have just taken the list of supplied options and then transformed them and passed them to get_posts(), not pull them into a pre-defined array.

  5. cswaim
    Plugin Author

    Posted 4 years ago #

    cdaley1981....finally got around to fixing this. I have tested on 2 sites and it seems to work. Let me know if you have any problems with the change.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TPG Get Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic