小编use*_*429的帖子

wordpress特色图片来自外部网址,无需下载

我想在wordpress上使用外部图片作为特色图片.

要么改变worpdress代码.(添加一个图像元变量框,接受网址并进行一些修改,以便正确显示网址中的精选图像)

或者修改插件WP远程缩略图,它从图像URL设置特色图像.它下载图片并在wordpress中创建缩略图并设置特色图像.

修改:*没有从网址下载,只需使用网址直接在博客上显示.*从wordpress生成的网址中删除wp-content/uploads以显示特色图片(仅限外部网址)*无缩略图创建.

非常感谢你阅读我知道有很多关于这个问题的问题,但如果我们解决这个问题,它可能会对很多人有用.

这里的代码:

<?php
/*
Plugin Name: WP Remote Thumbnail
Plugin URI: http://magnigenie.com/wp-remote-thumbnail-set-external-images-featured-image/
Description: A small light weight plugin to set external/remote images as post thumbnail/featured image.
Version: 1.0
Author: Nirmal Kumar Ram
Author URI: http://magnigenie.com
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
?>
<?php

/**
 * Initialize wprthumb on the post edit screen.
 */
function init_wprthumb() {
    new wprthumb();
}

if ( is_admin() ) {
    add_action( 'load-post.php', 'init_wprthumb' );
    add_action( 'load-post-new.php', 'init_wprthumb' );
}


class …
Run Code Online (Sandbox Code Playgroud)

wordpress image featured

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

featured ×1

image ×1

wordpress ×1