Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 166 total)
  • Author
    Posts
  • in reply to: How to get the current url, so that I can redirect? #48655
    EddyPiVEddyPiV
    Participant

    Hi, I've taken another route.
    When the user visits a specific page, I store the page URL in a custom field for that user, and I add there the query parameters to the URL, so that it's complete. (The page is only available to logged in users)
    This works, the URL that's stored in the user profile is correct: when I copy it and paste it in the browser it shows the page correctly filled with the data from the query variables.

    That customer field is in the redirect, but it leads to an 'Invalid request. Please try again.' error.
    So the URL is correct, but it looks like the redirect doesn't handle it properly.

    This is the command:
    [mb_frontend_form id='paying-member-input-details' object_id='{{ post.ID }}' post_fields='' submit_button='Save' redirect='{{ user.tg_chat_redirect }}' ]

    Pls advise.

    in reply to: MetaBox AIO stops page contents from showing #47278
    EddyPiVEddyPiV
    Participant

    Hi Peter,

    Correct, there was a View with location Code - should have been Shortcode.
    Solved, thanks

    in reply to: How to show relationships in same order as set in backend? #46135
    EddyPiVEddyPiV
    Participant

    Peter, fyi:
    I did a complete plugin conflict test with theme Twenty Four, and still the same.

    Looking forward to your advise.

    in reply to: How to show relationships in same order as set in backend? #46131
    EddyPiVEddyPiV
    Participant

    Peter, it didn't make a difference, so I've set up an admin account for you, and sent the login credentials as requested.

    Thanks, good luck.

    in reply to: How to get field-value in the Settings page? #46123
    EddyPiVEddyPiV
    Participant

    Hi Peter,

    Thanks, with your help I got it working.

    in reply to: Getting the field-values of another user #46122
    EddyPiVEddyPiV
    Participant

    Hi Peter,

    Thanks, with your help I got it working.

    in reply to: How to show relationships in same order as set in backend? #46119
    EddyPiVEddyPiV
    Participant

    Peter,

    If I do that, they are shown in descending order of title, that's not the order in the backend.
    That's why I tried orderby: none, hoping that it would result in the order of the backend, but it didn't work. That's exaclty why I started this thread.

    So any advise?

    in reply to: How to show relationships in same order as set in backend? #46111
    EddyPiVEddyPiV
    Participant

    Peter, this is the code for the page.

    {% set args1 = { post_type: 'repetitie-avond', posts_per_page: -1, orderby: 'date', order: 'asc' } %}
    {% set posts = mb.get_posts( args1 ) %}
    
    {% for post in posts %}
        <h2><strong>{{ post.title }}</strong></h2>
        <p>{{ post.content }}</p>
        {% set args2 = {post_type: 'muziek', nopaging: true, orderby:'none', relationship: {id: 'muziek-op-repetitie-avond', from: post.ID}} %}
        {% set muzieknummers = mb.get_posts( args2 ) %}
    
        {% set counter = 0 %}
        {% for muziek in muzieknummers %}
            {% set counter = counter +1 %}
            {% set post2 = mb.get_post( muziek.ID ) %}
            <p><a href="{{ post2.url }}">{{ post2.post_title }}</a></p>
        {% endfor %}
    
        {% if  counter == 0 %}
            Er is nog geen muziek voor deze avond vastgelegd. - no music yet - 
        {% endif %}
    <hr />
    {% endfor %}

    Here is a short video of all settings involved: https://drive.google.com/file/d/1Ok9HploeRIkomw7uukIa7cuikxAFH1gN/view?usp=drive_link

    Regards,
    Eddy

    in reply to: Viewing relationships - how to get it showing?? #46093
    EddyPiVEddyPiV
    Participant

    Thanks Peter, you pointed me in the right direction. It's working now.

    in reply to: Viewing relationships - how to get it showing?? #46086
    EddyPiVEddyPiV
    Participant

    Thanks Peter.

    I noticed that in the first attempt I had set the post type to courses, instead of course. That was it.

    I expanded the code to show thumbnail and post title. That worked nicely.
    Then I added the condition to show only for coursecategory = training, that's where I step into a critical error.

    {% set args = {post_type: 'course', nopaging: true, relationship: {id: 'student-results', from: user.ID}} %}
    {% set courses = mb.get_posts( args ) %}
    
    <div class="completed_courses">
    {% for course in courses %}
        {% set coursecategory = mb.get_the_term_list( result.ID, 'coursecategory', '', ', ' ) %}
        {% if  coursecategory  is  'training' %}
       	<div class="course">
            {% set post = mb.get_post( result.ID ) %}
            {{ mb.get_the_post_thumbnail( result.ID, 'thumbnail' ) }}
            <p style="text-align: center;"><strong>{{ post.post_title }}</strong></p>
    	</div>
        {% endif %}
    {% endfor %}
    </div>

    Hopefully you can help me here?
    Thanks!

    EddyPiVEddyPiV
    Participant

    Thanks Peter for sharing this link re the first point.

    Re point 2: No, there are no <p> and </p>'s. I know that this will result in proper showing, but the users are 'simple minds' and I don't want to bother with adding this to their text. So they just enter the text in the (classic) Visual editor.
    But now it shows as a concatenation of words, all on 1-2 lines.

    For this case I'll fall back to the display-posts plugin that handles it out of the box and also respects <!--more-->.

    Thanks for your help.

    EddyPiVEddyPiV
    Participant

    I had set up the custom fields in a way that they were only visible in admin area to the Admin role, and let users edit in the frontend. But perhaps that's a conflicting idea?

    I did many tests, and probably confused myself when I said the user could edit in admin area and not in frontend.
    Anyway, I have now removed the setting that fields are only visible for the Admin role.
    Now visible to the user and user can edit in the frontend.

    So consider it solved.

    Thanks Peter

    in reply to: Twig condition on cloned group field #45987
    EddyPiVEddyPiV
    Participant

    Thanks Peter. Fully makes sense, I just didn't think of it myself.

    in reply to: List of all users with custom field = '123' #45813
    EddyPiVEddyPiV
    Participant

    I found it already, and expanded the code to my liking.

    EddyPiVEddyPiV
    Participant

    Peter, the audio was file type URL.
    I tried various scenarios, and with File Input it works properly. That file type fits perfectly, as all music is already in the media library.

    So thanks for your help.

Viewing 15 posts - 16 through 30 (of 166 total)