• Hello everyone,

    I’ve created a template for my PORTFOLIO ITEM pages; the page is structured as follows:

    – title
    – video or image gallery
    – text
    – slider of other PORTFOLIO ITEMS

    For the slider at the bottom of the page, I’ve created a PORTFOLIO LAYOUT that picks random PORTFOLIO ITEMS from a specific category; in the template page source, I used the do_shortcode() function to call the relative shortcode.

    So this is just a random PORTFOLIO ITEMS slider, but I would like to transform it into a related PORTFOLIO ITEMS slider; in other words, within the template page php, I would like to get some parameters from the current PORTFOLIO ITEM (tags or categories) and dynamically create a slider that picks PORTFOLIO ITEMS with the same parameters.

    Is that possibile?

    Thanks in advance!
    Camilla

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nikita

    (@nko)

    Hi Camila.

    You need to use WP_Query to get related posts. I think this article should help – https://isabelcastillo.com/related-custom-post-type-taxonomy

    If you want to show related posts using Visual Portfolio shortcode, I don’t think this is possible now, as shortcode don’t support extra parameters, only layout ID.

    Regards, nK.

    Thread Starter tubetto

    (@tubetto)

    Hello nK,

    thanks for your reply.
    I know that I should use WP_Query to pull items from DB; I hoped that I could dynamically update the slider portfolio layout with a related items list, but clearly that’s not possible as the shortcode takes no extra parameters, just as you explained me.

    Thanks anyway,
    Camilla

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Related items Layout’ is closed to new replies.