• Resolved trey96

    (@trey96)


    Hi,

    I am currently using the following shortcode to display all posts on my site:

    [the-post-grid id=”617″ ]

    However, I would like to sow posts for a specific user. How do I use the same or similar shortcode to enter the exact username of a user? For example, something like the following:

    Username is JohnDoe

    [the-post-grid id=”617″ user=”JohnDoe”]

    My guess is that some PHP code might be involved. Please help me find a solution. I would greatly appreciate a speedy response. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Habib

    (@habibjh)

    It’s a dynamic shortcode so any manual paramater doesn’t work for the [the-post-grid] shortcode. If you would like to pull posts by user you need to choose a user from the query builder of the shortcode otherwise it doesn’t work.

    You can easily pick a user from this settings – https://prnt.sc/n1wR2Eq_PE5r

    Thank you 🙂

    • This reply was modified 3 months, 3 weeks ago by Habib.
    Thread Starter trey96

    (@trey96)

    Hi @habibjh

    I appreciate the quick reply. The trouble with using the query builder is that I would have to manually select a user each time a new person registers on my site. I have a setup where I dynamically swap out the usernames, but I would need a shortcode to do it. I suppose I would need a custom shortcode coupled with PHP code to add to my functions.php file. Can you put that PHP code together for me, along with a custom shortcode? Thank you in advance.

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