Skip Navigation

[Resolved] Raw output Image Url in slider

This support ticket is created 7 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 2 voices.

Last updated by Minesh 7 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#545039

I am trying to: Create a slider with raw image url

Because I've built the theme with themler, I can also use their shortcodes.
I had too many problems with Flexslider.

[types field='foto2' raw='true'] works fine, the url show perfectly.
But in the themler shortcode it wont work...

[slider interval=2000 pause_on_hover=true navigator_wrap=true ride_on_start=true animation="left" show_navigator=true show_indicators=false slides_wide=true css="width:1200px;height:800px;" indicators_css="text-align:center;vertical-align:bottom;"]

[slide css="background-image:url( [types field='foto2' raw='true'][/types] );background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]

[/slider]

I see:
[/types] );background-repeat:repeat;background-attachment:scroll;background-position:center center;"]

Can you help me with this?

#545166

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - this is due to shortcode inside shortcode. What if you create a custom shortcode to parse your shortcode.

For example - something like this:

function func_run_slide_shortcode() {

$x = do_shortcode("[types field='foto2' raw='true'][/types]");
return do_shortcode('[slide css="background-image:url(".$x.");background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]');
	
}
add_shortcode( 'run_slide_shortcode', 'func_run_slide_shortcode');

so use - [run_slide_shortcode] shortocde inside your view/content template you are using.

#545442

Hi, Tanks for your time!

But I see only the first and the 3th slide, not the slide that is placed by the shortcode.
I put the script in Functions.php and placed the shortcode in the slider Shortcode.

[slider interval=2000 pause_on_hover=true navigator_wrap=true ride_on_start=true animation="left" show_navigator=true show_indicators=false slides_wide=true css="width:1200px;height:800px;" indicators_css="text-align:center;vertical-align:bottom;"]

[slide css="background-image:url(<em><u>hidden link</u></em>);background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]

[run_slide_shortcode] 

[slide css="background-image:url(<em><u>hidden link</u></em>);background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]

[/slider]

What did I do Wrong?

#545532

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - it should work but to investigate this further I need problem URL and access details and how many slides it should display. Could you please share all required information that will help me to debug this issue further.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#545581

Question

I need to place 5 slides.
Can i duplicate the script like this?

function func_run_slide_shortcode2() {

$x = do_shortcode("[types field='foto2' raw='true'][/types]");
return do_shortcode('[slide css="background-image:url(".$x.");background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]');

}
add_shortcode( 'run_slide_shortcode2', 'func_run_slide_shortcode2');

function func_run_slide_shortcode3() {

$x = do_shortcode("[types field='foto3' raw='true'][/types]");
return do_shortcode('[slide css="background-image:url(".$x.");background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]');

}
add_shortcode( 'run_slide_shortcode3', 'func_run_slide_shortcode3');

function func_run_slide_shortcode4() {

$x = do_shortcode("[types field='foto4' raw='true'][/types]");
return do_shortcode('[slide css="background-image:url(".$x.");background-repeat:repeat;background-attachment:scroll;background-position:center center;"][/slide]');

}
add_shortcode( 'run_slide_shortcode4', 'func_run_slide_shortcode4');

And then ofcourse
[run_slide_shortcode2]
[run_slide_shortcode3]
[run_slide_shortcode4]

#545596

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I need to do some changes to functions.php file. Unfortunately, FTP access details are not working at this end. Could you please resend it to me. Do I need to use port number?

I have set the next reply to private which means only you and I have access to it.

#545637

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I tried with all ways but this looks like shortcode inside shortcode is not working even though we pass correct image url after parsing the shortcode.

You may try to contact themler and ask them how you can parse the shortcode and assign value to the [slide] shortcode.

#545644

Oke, thanks for your time!

#545647

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

your welcome.

#547210

Is there an other way to get this working?
I need to make a slider of images from a custom field. I have not heard anything from Themler yet. Do you know a slider whose code is on the page itself so I can combine it with your shortcode?

#547211

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you can check by installing our addon plugin Module Manager:
=> https://toolset.com/home/module-manager/

You will find slider tab and check with flex slider module.