markburton52
Forum Replies Created
-
Just to confirm: the problem wasn’t with the shortcode but with the uploaded events. Both old and new version work: I actually prefer the way events are formatted in the original version.
Hi, thanks for the rapid answer. I don’t think that’s it. Some events do appear and for some reason when I did a bulk upload of events from a csv file (using WP All Import), only some have post id numbers and it’s those that are found in the search. I’ll dig into the database to see what’s going on but it looks like a local problem to my setup.
Thanks – very helpful. I’ve got it working now. Note that there should be no ‘-has’ in the expression for the null case:
{has_att_link_to_book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link_to_book}
{no_att_link_to_book}
no booking needed
{/no_att_link_to_book}Sorry no that didn’t work. Here is the working LATT one and the non-working ATT one. Removing the att_ as suggested made no diffrence in the ATT version – is something still wrong in the php snippet?
{has_att_link to book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link to book}
{no_has_att_link to book}
no booking needed
{/no_has_att_link to book}
{has_latt_website}
<a href="#_LATT{website}">website</a>
{/has_latt_website}
{no_has_latt_website}
no website
{/no_has_latt_website}Thanks – not your mistake but mine, but I’m getting this output on the front page.
{has_att_link to book} link to book {/has_att_link to book} {no_has_att_link to book} no booking needed {/no_has_att_link to book}
The template formatting is identical to that used for the previous location one (with the obvious changes).
I did a conflict test: however I couldn’t disable the two plugins being used in this context: Ultimate Member and Events Manager. No other conflicts are apparent. It’s curious that the profile link shortcode does work perfectly when applied via the EM Attribute / Custom Field but the url one doesn’t (nor does the plain user meta version used the same way), although clearly the shortcode works when used in the editor. It’s a frustration but if it is conflict due to some EM code (it has an internal bookings functionality but disabled on my site) then I will have to use a work around that doesn’t dynamically link the user profile to the EM event custom post for the few artists that do supply an external booking link.
@joneiseman I’ve tried to clone and edit your code to do similar with a link in the event posts:
add_filter('em_event_output_show_condition', function($show_condition, $condition, $key, $EM_Event) {
if ($condition == "has_link_to_book" && !empty($event->event_attributes['link to book'])) {
return true;
}
else if ($condition == "no_has_link_to_book" && empty($event->event_attributes['link to book'])) {
return true;
}
return $show_condition;
}, 10, 4);and in the single event page template
{has_att_link to book}
<a href="#_ATT{link to book}">link to book</a>
{/has_att_link to book}
{no_has_att_link to book}
no booking needed
{/no_has_att_link to book}But the link isn’t coming through to the front end. Can you spot an error in the code?
(We aren’t using the inbuilt EM booking functionality but rather links to external sites for that.)
Thanks
I’ve been using the plugin by @missveronicatv and it’s really helpful.
I’ve one problem though with the url variant. I’m using it to display a link via the Events Manager (EM) plugin. I can apply it via the tinyMCE editor in the usual way but want to use the EM-specific attibutes function which allows me a lot of control in formatting the event custom posts. These attributes, specified in the EM html event post template, are actually custom fields. When I apply the url shortcode in this way, I get a broken link.
The shortcode is [um_profile_info type=”url” meta_key=”dbem_caf_um_bookinglink” user_id=”147″]Booking link[/um_profile_info]
Via tinyMCE editor: I get the correct, clickable url link: https://www.eventbrite.co.uk/e/word-of-mouth-chorlton-arts-festival-tickets-1217686425879
Via the EM ustom attribute I get https://chorltonartsfestival.org/events/test-event/%5Bum_profile_info%20type=The profile link shortcode does work properly when submitted via an attribute.
I suspect the problem is some kind of code conflict between the UM snippet and the EM code but maybe there is a way around it.
Thanks, I’ve got it working. It looks like it was the
<section class="em-event-artist">
tag that interfered – that was a legacy from an earlier attempt to use user meta to render images in EM. The shortcodes I’m using make the <img> tag unnecessary.
Forum: Plugins
In reply to: [Leaflet Map] Map rendering appears to have stopped working for new mapsThanks – yes that works now. I can’t see where I went wrong – but possibly via a spreadsheet formatting error (as I prepare the shortcodes using a spreadsheet formula from the lat and long).
Thank you, that’s perfect!
@yuriinalivaiko Thanks – I didn’t find all that before – is it new? Also, there is a missing closing double quote in the um_author_profile_link information.
Do you have the
user_id
available from the “Events Manager” plugin
to insert in the “Shortcode Profile Info” plugin’suser_id
filter?Sorry, I don’t understand. There aren’t user ids in events manager, at least as we use it (no user inputs).
Thanks – that is all working properly now for me (I haven’t tried the video version).
Thanks. I’ve tried it and you can see the results on this page.
It all worked for me except for the user profile link which delivered the logged in user’s profile, not the user specified via user id. I didn’t try the video version.
It would also be good if it were possible to put a field’s content into the link text in the URL versions. E.g. the last test on my page delivers the artist’s performance name – having that link to their profile would save a few steps for me. I know that you can’t usually nest shortcodes within one another.
It’s going to be a great resource and I’ll acknowledge your work when we implement it on the live site.