• Resolved Bob Kruse

    (@2440media)


    Hi,
    On my Post content type, I have a related photos field (related_photos) referencing a custom content type called Photos. I can add Photos in the More Fields section within a Post and I can also manually reorder them with the up/down arrows (https://www.screencast.com/t/6WTa6LprL41). But when I display the Photos via shortcode, it doesn’t reflect that sort order. What is the syntax for the orderby clause to get that manual sort order?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @2440media

    What shortcode are you using?

    Cheers, Jory

    Thread Starter Bob Kruse

    (@2440media)

    Hi,
    I’m using [pods name=”photo” limit=”30″ template=”Product Photos”]

    thanks

    Plugin Author Jory Hogeveen

    (@keraweb)

    Thats the shortcode for fetching the “Photo” Pods.
    What content are you using in your template “Product Photos”?

    Cheers, Jory

    Thread Starter Bob Kruse

    (@2440media)

    Right, within a blog post I added the related Products Photos, I want to display them with that shortcode. But they don’t comply with the sort order I set below. The content in the “product photos” is the image with some meta data.

    So I’m trying to figure out the shortcode syntax needed to display them in the order I set for them.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @2440media

    within a blog post I added the related Products Photos

    “Product Photos” was a template right?

    If you want to display related items you should use the field you created for that, not just fetching all photos.

    If you want to add these related photos within your post content you can use the following shortcode:
    [pods field="your_related_photos_field"]

    And if you want to use that field within a Pods template you can simply use the magic tag: {@your_related_photos_field}

    Cheers, Jory

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode to set Orderby for related posts?’ is closed to new replies.