Forum Replies Created
-
AuthorPosts
-
EddyPiV
ParticipantHi, 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.
EddyPiV
ParticipantHi Peter,
Correct, there was a View with location Code - should have been Shortcode.
Solved, thanksAugust 12, 2024 at 1:35 PM in reply to: How to show relationships in same order as set in backend? #46135EddyPiV
ParticipantPeter, fyi:
I did a complete plugin conflict test with theme Twenty Four, and still the same.Looking forward to your advise.
August 10, 2024 at 7:16 PM in reply to: How to show relationships in same order as set in backend? #46131EddyPiV
ParticipantPeter, 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.
EddyPiV
ParticipantHi Peter,
Thanks, with your help I got it working.
EddyPiV
ParticipantHi Peter,
Thanks, with your help I got it working.
August 8, 2024 at 10:22 PM in reply to: How to show relationships in same order as set in backend? #46119EddyPiV
ParticipantPeter,
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?
August 7, 2024 at 11:26 PM in reply to: How to show relationships in same order as set in backend? #46111EddyPiV
ParticipantPeter, 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,
EddyEddyPiV
ParticipantThanks Peter, you pointed me in the right direction. It's working now.
EddyPiV
ParticipantThanks 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!July 26, 2024 at 1:31 PM in reply to: ✅How to display post contents in a list in a way respecting the paragraphs? #46015EddyPiV
ParticipantThanks 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.
July 24, 2024 at 11:51 PM in reply to: ✅Frontend data submission not saved for user role subscriber #45998EddyPiV
ParticipantI 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
EddyPiV
ParticipantThanks Peter. Fully makes sense, I just didn't think of it myself.
EddyPiV
ParticipantI found it already, and expanded the code to my liking.
December 19, 2023 at 10:17 PM in reply to: ✅download button acts differently when triggered through field vs when hardcoded #44143EddyPiV
ParticipantPeter, 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.
-
AuthorPosts