문제

I've created a site on a localhost that is going to be migrated to a ssl server, with the scripts, css, images all coming from a CDN.

To call files in the site i'm using bloginfo('template_directory'); is there a way to alter this to fit with the sites requirements?

도움이 되었습니까?

해결책

You can filter template_directory_uri:

<?php
add_filter( 'template_directory_uri', function( $template_dir_uri ){
    return str_replace( 'http://example.com', 'https://cdn.example.com', $template_dir_uri );
});

This will change URIs so they point at a CDN subdomain served via HTTPS.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top