Change slide links programatically
-
The issue can be found here: https://oneshc.staging.wpengine.com/
The preview works: Yes
It works with other themes: Yes
It works when I disable all other plugins: Haven’t Tried
Meta Slider version: 3.4I am wondering how I can dynamically change the link on a slide.
I am looking at the following page, to see if it is possible
https://www.metaslider.com/documentation/metaslider_type_slider_anchor_attributes/I am using a Nivo slider.
add_filter( ‘metaslider_nivo_slider_anchor_attributes’, ‘metaslider_change_lookup_link’, 10, 4);
function metaslider_change_lookup_link ($attributes, $slide, $slider_id) {
//Change the lookup link on slide 5286 to be dynamic
if ($slide->ID == 5286) {
//Get member type info
$member_type = xprofile_get_field_data(‘Member Type’,bp_loggedin_user_id());
If ($member_type == ‘A’ ){
Set link here to match this type
} else {
Set a different link
}}
return $attributes;
}The page I need help with: [log in to see the link]
- The topic ‘Change slide links programatically’ is closed to new replies.