Skip Navigation

[Resolved] Featured Image, output='url' in http:// while site url is on https://

This support ticket is created 8 years, 3 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 6 replies, has 5 voices.

Last updated by thomasL-2 8 years, 3 months ago.

Assisted by: Adriano.

Author
Posts
#362044
<div style="background:url('[wpv-post-featured-image size='full' output='url']');"></div>

I am trying to:
Output url from featured image or custom post type in https://

I visited this URL:
/

I expected to see:
[wpv-post-featured-image size="full" output="url"] :
Output url = hidden link

Instead, I got:
[wpv-post-featured-image size="full" output="url"] :
Output url = hidden link

WordPress Settings
WordPress address (URL): hidden link
Site Address (URL): hidden link

Media Library
Image (URL): hidden link

#362193

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Dirk,

Thank you for contacting our support forum.

I've reported this to our 2nd tier supporters, hopefully we can find a solution for this soon.

Also we may need access to your website so apply the patch if they are able to create one.

I'll enable the private fields for your next response so you can provide the Admin credentials as well as FTP details.

Thanks,
Shane

#362248

Just wanted to note it my site is not experiencing this. Dirk, I know that's not helpful to you, but it can be for the folks tracing down the problem.

When I view the home page at hidden link (to get past the coming-soon home page), all images generated with the

 [wpv-post-featured-image size="full" output="url"] 

shortcode render as

 style="background-image: url('<em><u>hidden link</u></em> 

.

I am using the Magazine style starter theme and current versions of Layouts, Views and Types.

#362339

Hello,

I’m Adriano, Toolset support lead and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

We do use the standard WP function get_the_post_thumbnail and it gets the URL when the image has been uploaded. So in case it was uploaded in http, you can easily replace it using the filter below:

add_filter( 'wpv-post-featured-image', 'replace_http_post_featured_image' );
function replace_http_post_featured_image( $out ){
	if( is_ssl() ){
		$out = str_replace("http", "https", $out);
	}

	return $out;
}
#362398

Hello,

@SRoberts, Thank you for your suggestion, but i used featured image in views, so i couldn't write a single url.

@adriano, Thanks you so much solved my problem!

#362414

You are welcome.

#366748

Hi,

This actually results in broken images on some devices, e.g. android as sometimes the src value begins with "httpss" (redundant "s") instead of "https".

It should rather be

$out = str_replace("<em><u>hidden link</u></em>", "<em><u>hidden link</u></em>", $out);

therefore.

Any idea when this will be fixed for good?

Cheers,
Thomas

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.