标签: featured

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万
查看次数

在WP_Query中获取WooCommerce特色产品

我将WooCommerce更新到版本3.0但我无法在我的主题上显示特色产品,我google了一段时间并让WC删除了_feature并将其添加到分类中.但我不太了解我的主题如何获得特色产品.

这是错误的特色产品的代码.

$meta_query   = WC()->query->get_meta_query();
    $meta_query[] = array(
        'key'   => '_featured',
        'value' => 'yes'
    );

    $args = array(
        'post_type'           => 'product',
        'post_status'         => 'publish',
        'ignore_sticky_posts' => 1,
        'posts_per_page'      => $products,
        'orderby'             => $orderby,
        'order'               => $order == 'asc' ? 'asc' : 'desc',
        'meta_query'          => $meta_query
    );
Run Code Online (Sandbox Code Playgroud)

如果您知道DataBase中的特色项目在哪里.非常感谢.

php wordpress product featured woocommerce

6
推荐指数
4
解决办法
9088
查看次数

Joomla 3.2.3精选文章订购

在Joomla 3.2.3中,我不能像J 1.5.x那样制作文章订单,我想按照我在管理员区域定义的那样制作首页文章.我尝试了几种方法仍然没有任何成功,已经有一周了...... :(我试过的最后一次是:

a) Content => Featured Article => (at top right) sort table by "Ordering Descending"
b) I moved the article in the order i want, then click at "Double arrow" to save it
c) Then i click at "Options" (right top), it will open the Global configuration -> Article page. 
+) Then i click at "Category"  => Choose Layout = Blog,   
+) "Blog/Featured Layout" => Multi column Order = Across. 
+) "Shared Option" => Category Order = …
Run Code Online (Sandbox Code Playgroud)

article joomla featured

5
推荐指数
1
解决办法
7152
查看次数

如何将自定义字段添加到自定义帖子类型?

早上好.

我创建了一个名为"Products"的自定义帖子类型.我想创建一个自定义字段(元数据是正确的术语吗?),我的客户可以勾选一个框来确定此CPT中的给定帖子是否是特色帖子.

以下是我的functions.php中用于创建"产品"CPT的代码:

function products_custom_init() {

    $labels = array(
        'name' => _x('Products', 'post type general name'),
        'singular_name' => _x('Product', 'post type singular name'),
        'add_new' => _x('Add New', 'products'),
        'add_new_item' => __('Add New Product'),
        'edit_item' => __('Edit Product'),
        'new_item' => __('New Product'),
        'view_item' => __('View Product'),
        'search_items' => __('Search Products'),
        'not_found' =>  __('Nothing found'),
        'not_found_in_trash' => __('Nothing found in Trash'),
        'parent_item_colon' => ''
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'show_in_menu' => …
Run Code Online (Sandbox Code Playgroud)

wordpress featured custom-fields custom-post-type

5
推荐指数
3
解决办法
2万
查看次数

如何在Wordpress中添加特色图像标题

我希望有人可以帮我解决问题.我正在为我的一个朋友建立一个新闻网站.该网站开始走到一起,但我无法找到如何为特色图片添加字幕.今天我一直在寻找网络,有很多方法可以通过向php工作表添加代码来实现,但我不确定我在做什么.

我已将这些代码添加到functions.php代码中,但所有内容都是成对的.

我保持手指交叉,有人可以通过键入我做什么来帮助我.

预先感谢您的帮助.

亲切的问候

约翰

wordpress image captions featured

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

如何将youtube嵌入代码中的youtube缩略图设置为wordpress中的特色图像?

如何从youtube视频的iframe嵌入代码设置youtube缩略图的外部网址(不在我网站上传)?

是否可以创建将拉出外部YouTube图标缩略图URL并将其设置为特色图像的功能:

<iframe width="420" height="315" src="www.youtube.com/embed/gTp4sZtjHS" frameborder="0" allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)

不要问OEmbed或类似的事情,我认为问题很清楚.

url wordpress image external featured

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

要求作者为帖子设置特色图片

我已经定制了我的Wordpress网站设计,使用特色图片非常过分.这就是为什么我需要要求非管理员发布的所有帖子都要求设置特色图像.

这怎么可能?

php wordpress image function featured

4
推荐指数
2
解决办法
3039
查看次数

Wordpress 3中的"特色图片"或"缩略图"?

特色图像和缩略图之间有什么区别,为什么要使用其中一个?

wordpress thumbnails featured

2
推荐指数
1
解决办法
604
查看次数

多个特色图像wordpress

我想创建一个商业页面,其中包含商标本身的徽标和照片.我为此使用自定义post-type.但是,我无法使第二个特色图像工作.我想让它在没有插件的情况下工作.这是我的代码:

function create_post_type() {
    register_post_type( 
        'Bedrijven', array(
            'labels' => array(
            'name' => __( 'Bedrijven' ),
            'singular_name' => __( 'bedrijf' )
            ),
        'public' => true,
        'has_archive' => true,
        'supports' => array(
            'title',
            'editor',
            'comments',
            'excerpt',
            'thumbnail',
            'author',
            'MultiPostThumbnails',
            'page-attributes',)

        )
    );
}
add_action( 'init', 'create_post_type' );


if (class_exists('MultiPostThumbnails')) {
  new MultiPostThumbnails(array(
     'label' => 'Thumbnail Image',
     'id' => 'thumbnail-image',
     'post_type' => 'bedrijven'
   ) );
 }
Run Code Online (Sandbox Code Playgroud)

wordpress image featured

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

在Wordpress中以编程方式添加带有ALT文本的特色图片?

有一些示例如何在Wordpress中以编程方式添加带有特色图片的帖子,但我也需要添加带有特色图片和ALT文本的帖子。我该怎么做?

谢谢。

wordpress text image featured alt

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

在Woocommerce 3中获取特色产品

我想在新订单电子邮件模板中添加特色产品用于追加销售(或最近产品或最畅销产品).它像Upsell一样使用电子邮件营销.如何将其添加到woocommerce电子邮件模板中,以便电子邮件末尾有一个部分显示我的精选/近期/畅销产品.我尝试在新订单电子邮件模板中使用此代码,但没有任何作用.我使用了所有最新版本的wordpress n woocommerce.

$args = array(  
    'post_type' => 'product',  
    'meta_key' => '_featured',  
    'meta_value' => 'yes',  
    'posts_per_page' => 1  
);  

$featured_query = new WP_Query( $args );  

if ($featured_query->have_posts()) :   

    while ($featured_query->have_posts()) :   

        $featured_query->the_post();  

        $product = get_product( $featured_query->post->ID );  

        // Output product information here  

    endwhile;  

endif;  

wp_reset_query(); // Remember to reset
Run Code Online (Sandbox Code Playgroud)

php wordpress product featured woocommerce

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