EEfaq论坛-赚客自留地

 找回密码
 免费注册
查看: 1778|回复: 24

求助wp 略缩图不显示要怎么调?

  [复制链接]
发表于 2013-6-10 13:39:48 | 显示全部楼层 |阅读模式
111.jpg

上面滚动每篇文章的略缩图  不能够显示图片出来。
点击链接进去能看到。请教要怎么设置才能看到文章里面的略缩图片。



发表于 2013-6-10 13:42:31 | 显示全部楼层
有可能是浏览器问题,建议换个浏览器试试.

点评

换了浏览器也一样  详情 回复 发表于 2013-6-10 13:44
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 13:44:16 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2013-6-10 13:51:33 | 显示全部楼层
post里面要设置featured image

点评

就是这个  详情 回复 发表于 2013-6-10 18:35
在这里面设置吗?  详情 回复 发表于 2013-6-10 13:56
回复 支持 反对

使用道具 举报

发表于 2013-6-10 13:56:39 | 显示全部楼层
估计是调用的图片位置不正确吧!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 13:56:39 | 显示全部楼层
luguokankan 发表于 2013-6-10 13:51
post里面要设置featured image

在这里面设置吗?


<?php
/*
Plugin Name: Single Post Template
Plugin URI: http://www.nathanrice.net/plugins
Description: This plugin allows theme authors to include single post templates, much like a theme author can use page template files.
Version: 1.3
Author: Nathan Rice
Author URI: http://www.nathanrice.net/

This plugin inherits the GPL license from it's parent system, WordPress.
*/

//        This function scans the template files of the active theme,
//        and returns an array of [Template Name => {file}.php]
if(!function_exists('get_post_templates')) {
function get_post_templates() {
        $themes = get_themes();
        $theme = get_current_theme();
        $templates = $themes[$theme]['Template Files'];
        $post_templates = array();

        $base = array(trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()));

        foreach ((array)$templates as $template) {
                $template = WP_CONTENT_DIR . str_replace(WP_CONTENT_DIR, '', $template);
                $basename = str_replace($base, '', $template);

                // don't allow template files in subdirectories
                if (false !== strpos($basename, '/'))
                        continue;

                $template_data = implode('', file( $template ));

                $name = '';
                if (preg_match( '|Single Post Template.*)$|mi', $template_data, $name))
                        $name = _cleanup_header_comment($name[1]);

                if (!empty($name)) {
                        if(basename($template) != basename(__FILE__))
                                $post_templates[trim($name)] = $basename;
                }
        }

        return $post_templates;

}}

//        build the dropdown items
if(!function_exists('post_templates_dropdown')) {
function post_templates_dropdown() {
        global $post;
        $post_templates = get_post_templates();
       
        foreach ($post_templates as $template_name => $template_file) { //loop through templates, make them options
                if ($template_file == get_post_meta($post->ID, '_wp_post_template', true)) { $selected = ' selected="selected"'; } else { $selected = ''; }
                $opt = '<option value="' . $template_file . '"' . $selected . '>' . $template_name . '</option>';
                echo $opt;
        }
}}

//        Filter the single template value, and replace it with
//        the template chosen by the user, if they chose one.
add_filter('single_template', 'get_post_template');
if(!function_exists('get_post_template')) {
function get_post_template($template) {
        global $post;
        $custom_field = get_post_meta($post->ID, '_wp_post_template', true);
        if(!empty($custom_field) && file_exists(TEMPLATEPATH . "/{$custom_field}")) {
                $template = TEMPLATEPATH . "/{$custom_field}"; }
        return $template;
}}

//        Everything below this is for adding the extra box
//        to the post edit screen so the user can choose a template

//        Adds a custom section to the Post edit screen
add_action('admin_menu', 'pt_add_custom_box');
function pt_add_custom_box() {
        if(get_post_templates() && function_exists( 'add_meta_box' )) {
                add_meta_box( 'pt_post_templates', __( 'Single Post Template', 'pt' ),
                        'pt_inner_custom_box', 'post', 'normal', 'high' ); //add the boxes under the post
        }
}

//        Prints the inner fields for the custom post/page section
function pt_inner_custom_box() {
        global $post;
        // Use nonce for verification
        echo '<input type="hidden" name="pt_noncename" id="pt_noncename" value="' . wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
        // The actual fields for data entry
        echo '<label class="hidden" for="post_template">' . __("ost Template", 'pt' ) . '</label><br />';
        echo '<select name="_wp_post_template" id="post_template" class="dropdown">';
        echo '<option value="">Default</option>';
        post_templates_dropdown(); //get the options
        echo '</select><br /><br />';
        echo '<p>' . __("Some themes have custom templates you can use for single posts that might have additional features or custom layouts. If so, you’ll see them above.", 'pt' ) . '</p><br />';
}

//        When the post is saved, saves our custom data
add_action('save_post', 'pt_save_postdata', 1, 2); // save the custom fields
function pt_save_postdata($post_id, $post) {
       
        // verify this came from the our screen and with proper authorization,
        // because save_post can be triggered at other times
        if ( !wp_verify_nonce( $_POST['pt_noncename'], plugin_basename(__FILE__) )) {
        return $post->ID;
        }

        // Is the user allowed to edit the post or page?
        if ( 'page' == $_POST['post_type'] ) {
                if ( !current_user_can( 'edit_page', $post->ID ))
                return $post->ID;
        } else {
                if ( !current_user_can( 'edit_post', $post->ID ))
                return $post->ID;
        }

        // OK, we're authenticated: we need to find and save the data
       
        // We'll put the data into an array to make it easier to loop though and save
        $mydata['_wp_post_template'] = $_POST['_wp_post_template'];
        // Add values of $mydata as custom fields
        foreach ($mydata as $key => $value) { //Let's cycle through the $mydata array!
                if( $post->post_type == 'revision' ) return; //don't store custom data twice
                $value = implode(',', (array)$value); //if $value is an array, make it a CSV (unlikely)
                if(get_post_meta($post->ID, $key, FALSE)) { //if the custom field already has a value...
                        update_post_meta($post->ID, $key, $value); //...then just update the data
                } else { //if the custom field doesn't have a value...
                        add_post_meta($post->ID, $key, $value);//...then add the data
                }
                if(!$value) delete_post_meta($post->ID, $key); //and delete if blank
        }
}
?>


回复 支持 反对

使用道具 举报

发表于 2013-6-10 14:15:06 | 显示全部楼层
可以参考以下的文章设置.
http://down.chinaz.com/try/201110/1261_1.htm
回复 支持 反对

使用道具 举报

发表于 2013-6-10 14:50:29 | 显示全部楼层
3.5已经支持了 ,直接选上featured image就可以了

点评

请教有具体步骤吗?这个不会。  详情 回复 发表于 2013-6-10 15:02
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 15:02:44 | 显示全部楼层
chenkui 发表于 2013-6-10 14:50
3.5已经支持了 ,直接选上featured image就可以了

               请教有具体步骤吗?这个不会。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 15:15:17 | 显示全部楼层
featured image   找半天真的找不到这个featured image这个选项
回复 支持 反对

使用道具 举报

发表于 2013-6-10 17:00:20 | 显示全部楼层
qqufolove 发表于 2013-6-10 15:15
featured image   找半天真的找不到这个featured image这个选项

大哥,在这里.

Screenshot from 2013-06-10 16:59:38.png

点评

read me 里就这么两句话 wpClassifieds Theme Page: http://theme.anunciamex.com Licensed under GPL http://www.opensource.org/licenses/gpl-license.php REQUIREMENTS: - Wordpress 2.8+ required - PHP 5  详情 回复 发表于 2013-6-10 17:49

评分

参与人数 1e币 +1 收起 理由
qqufolove + 1 谢谢 灰常感谢

查看全部评分

回复 支持 反对

使用道具 举报

发表于 2013-6-10 17:16:04 | 显示全部楼层
楼上发的图,右边最下面的,点那个set...,选图就可以了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 17:30:31 | 显示全部楼层
22.jpg    我的没有啊

点评

看样子主题不支持.........看主题的readme,看是怎么设置这个feature art  发表于 2013-6-10 17:43
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 17:49:04 | 显示全部楼层
  read me 里就这么两句话

wpClassifieds

Theme Page:
http://theme.anunciamex.com

Licensed under GPL
http://www.opensource.org/licenses/gpl-license.php

REQUIREMENTS:
- Wordpress 2.8+ required
- PHP 5+

Install instructions and changelog:
Please visit http://theme.anunciamex.com

回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 17:49:27 | 显示全部楼层
luguokankan 发表于 2013-6-10 17:00
大哥,在这里.

  read me 里就这么两句话

wpClassifieds

Theme Page:
http://theme.anunciamex.com

Licensed under GPL
http://www.opensource.org/licenses/gpl-license.php

REQUIREMENTS:
- Wordpress 2.8+ required
- PHP 5+

Install instructions and changelog:
Please visit http://theme.anunciamex.com



点评

wpclassifieds.1.2.1 这个主题 我把主页代码发给你吗?  详情 回复 发表于 2013-6-10 18:12
wpClassifieds[/backcolor]  详情 回复 发表于 2013-6-10 18:10
主题扔上来,我看看代码  发表于 2013-6-10 17:51
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 18:10:45 | 显示全部楼层
qqufolove 发表于 2013-6-10 17:49
read me 里就这么两句话

wpClassifieds

wpClassifieds

回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 18:12:33 | 显示全部楼层
qqufolove 发表于 2013-6-10 17:49
read me 里就这么两句话

wpClassifieds

wpclassifieds.1.2.1  这个主题 我把主页代码发给你吗?

回复 支持 反对

使用道具 举报

发表于 2013-6-10 18:31:55 | 显示全部楼层
都是技术帝啊,赞一个
回复 支持 反对

使用道具 举报

发表于 2013-6-10 18:32:08 | 显示全部楼层
都是技术帝啊,赞一个
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-10 18:35:51 | 显示全部楼层
luguokankan 发表于 2013-6-10 13:51
post里面要设置featured image

wpclassifieds.zip (109.18 KB, 下载次数: 3)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|联系我们|Archiver|手机版|小黑屋|EEfaq论坛

GMT+8, 2024-5-3 02:34

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表