Support Forum » User Profile

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • JonSJonS
    Participant

    Fantastic. That was the missing piece I needed. Thanks Peter, you're a star.

    JonSJonS
    Participant

    Thanks to Peter for sorting me out with this.

    One other quick thing I'm struggling with.

    The tooltip popup shows the title and address (perfect) but I also want to show a link to the single page for that location.

    What is the variable I should be calling...

    location_on_map.url (url is wrong, what should it be?)

    I hope that makes sense.

    One last thing... can I stop the first location's tooltip from automatically showing? I just want to show the markers on the map and then, when one is clicked, have the tooltip appear which includes a link to that location.

    Many thanks in anticipation.

    JonSJonS
    Participant

    Thanks Peter.

    I've set you up with an admin login and sent the details via the contact form.

    All the best

    Jon

    JonSJonS
    Participant

    Thanks for your reply, Peter. That is the tutorial I've gone through in great detail multiple times but I just get a blank area where the map should be shown. I've set it all to use the custom post type I created. The field is all working fine. It should be so simple to have a map showing the markers but there's nothing.

    JonSJonS
    Participant

    Fantastic. I think the bit I was missing was the object_type. Working perfectly.

    Many thanks for the speedy response.

    in reply to: Show post term list but without links #30541
    JonSJonS
    Participant

    That worked perfectly. Thanks for that.

    in reply to: Ability to ORDERBY a custom field in a View? #29708
    JonSJonS
    Participant

    Sorted it. The url should be {{ post.post_name }}.

    in reply to: Ability to ORDERBY a custom field in a View? #29707
    JonSJonS
    Participant

    I'm almost there. The title should be referenced with {{ post.post_title }} but I don't know what the url should be.

    in reply to: Ability to ORDERBY a custom field in a View? #29703
    JonSJonS
    Participant

    My view is now like this:

    {% set args = { post_type: 'fixture', posts_per_page: -1, orderby: 'fixture_date_and_time', order: 'ASC' } %}
    
    <table>
        <thead align="left">
            <th>Event</th>
            <th>Date / Time</th>
            <th>Venue</th>
            <th>Age Group</th>
        </thead>
        {% set my_posts = mb.get_posts( args ) %}
        {% for post in my_posts %}
        <tr>
            <td><a href="{{ post.url }}">{{ post.title }}</a></td>
            <td><a href="{{ post.url }}">{{ post.fixture_date_and_time | date( 'D j M, Y \\a\\t h:i A' ) }}</a></td>
            <td>{{ mb.get_the_term_list( post.ID, 'fixture-venue', '', ', ' ) }}</td>
            <td>{{ mb.get_the_term_list( post.ID, 'fixture-age-group', '', ', ' ) }}</td>
        </tr>
        {% endfor %}
    </table>

    The URL isn't working, either, so it seems to be the built-in WP fields that don't work but the MB custom fields do.

    in reply to: Ability to ORDERBY a custom field in a View? #29702
    JonSJonS
    Participant

    Brilliant. That makes perfect sense. It's now working as it should except for one thing.

    The {{ post.title }} is blank. The other fields are displaying perfectly. I would have thought the title was the easiest part so am somewhat confused!

    in reply to: Ability to ORDERBY a custom field in a View? #29697
    JonSJonS
    Participant

    Following up on this, I've also put the shortcode onto another page and it's just showing the data from that page, not the custom post 'fixture' so the code seems to be doing nothing.

    in reply to: Ability to ORDERBY a custom field in a View? #29696
    JonSJonS
    Participant

    Thanks for your reply. I've followed all the information but it just isn't making any difference to the order on on the page.

    This is the code in my MB View which is set as a Shortcode type and I'm putting that shortcode into the archive template:

    {% set args = { post_type: 'fixture', posts_per_page: -1, orderby: 'fixture_date_and_time', order: 'ASC', meta_key: 'fixture_date_and_time' } %}
    {% set posts = mb.get_posts( args ) %}
    
    <table>
        <thead align="left">
            <th>Event</th>
            <th>Date / Time</th>
            <th>Venue</th>
            <th>Age Group</th>
        </thead>
        {% for post in query.posts %}
        <tr>
            <td><a href="{{ post.url }}">{{ post.title }}</a></td>
            <td><a href="{{ post.url }}">{{ post.fixture_date_and_time | date( 'D M j, Y h:i A' ) }}</a></td>
            <td>{{ mb.get_the_term_list( post.ID, 'fixture-venue', '', ', ' ) }}</td>
            <td>{{ mb.get_the_term_list( post.ID, 'fixture-age-group', '', ', ' ) }}</td>
        </tr>
    {% endfor %}
    </table>

    I'm changing the order from ASC to DESC and it's making no difference.

    What am I doing wrong?

    in reply to: Ability to ORDERBY a custom field in a View? #29674
    JonSJonS
    Participant

    This looks like exactly what I need. Where did you put that line of code?

    JonSJonS
    Participant

    That's brilliant. What a great plugin. This has almost completely solved my issue.

    I also have a button which should link to a custom post where a PDF has been uploaded but the field doesn't appear when I click to add a dynamic field and select Meta Box.

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