Support Forum ยป User Profile

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: โœ…Query a post relationship in Beaver Themer #32607
    paul@wpblueprint.design[email protected]
    Participant

    Absolutely amazing. I was looking at this is not empty and it was one of the next "guesses" I was going to try - for some reason I didn't try it.

    This worked absolutely perfectly and it means that metabox no having this feature in this screenshot is not a problem at all - I can just drop a shortcode into my single post templates and in fact I can totally control the markup ๐Ÿ™‚

    https://share.getcloudapp.com/mXuP0gyp - so this is no longer a problem ๐Ÿ™‚

    Thanks very much!

    Cheers
    Paul

    in reply to: โœ…Query a post relationship in Beaver Themer #32580
    paul@wpblueprint.design[email protected]
    Participant

    THanks Long,

    Much appreciated.
    To be honest I can achieve exactly what I need in views, but I don't know how to add if statement that checks if there are any items in the loop.

    E.g. if there are no related posts the don't display the "Related posts" text and the ul
    I know I am probably 2 lines away from this, but I can't figure it out (I tried some things but failed).
    Would you mind showing me the snippet? With this it is the last thing I could not achieve with ACF / Themer Integration.

    {% set relationship = attribute( relationships, 'test-rel' ) %}
    Related posts
    <ul>
        {% for post in relationship.to %}
        <li><a href="{{ post.url }}">{{ post.title }}</a></li>
        {% endfor %}
    </ul>

    Thanks in advance!
    Paul

    in reply to: โœ…Query a post relationship in Beaver Themer #32569
    paul@wpblueprint.design[email protected]
    Participant

    This is what I'm talking about

    https://share.getcloudapp.com/mXuP0gyp

    Cheers ๐Ÿ™‚

Viewing 3 posts - 1 through 3 (of 3 total)