Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/378.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 添加';特色IMG';到我的Wordpress滑块/旋转通过?_Php_Javascript_Jquery_Wordpress - Fatal编程技术网

Php 添加';特色IMG';到我的Wordpress滑块/旋转通过?

Php 添加';特色IMG';到我的Wordpress滑块/旋转通过?,php,javascript,jquery,wordpress,Php,Javascript,Jquery,Wordpress,我正在尝试完成我的Wordpress/jQuery/JS滑块的“主题化”;我现在有它,它成功地抓住了最新的Wordpress帖子,但没有在主“特色窗口”中完全循环浏览它们?(JavaScript错误?) 我通过一些基本问题的帮助做到了这一点: 下面是我正在使用的代码: <?php /** * @package WordPress * @subpackage Default_Theme */ $pagePtr="home"; include @ ("header.php"); //g

我正在尝试完成我的Wordpress/jQuery/JS滑块的“主题化”;我现在有它,它成功地抓住了最新的Wordpress帖子,但没有在主“特色窗口”中完全循环浏览它们?(JavaScript错误?)

我通过一些基本问题的帮助做到了这一点:

下面是我正在使用的代码:

<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
$pagePtr="home"; 
include @ ("header.php");
//get_header(); ?>   

<div id="content"> 


   <?php
/**
 * @package WordPress
 * @subpackage Default_Theme'

 */

//get_header(); ?>        
<div id="content"> 

<?php if (have_posts()) : ?>

<!--Your slider code goes here-->

           <?php 
            $args = array(
                'numberposts'     => 5,
                'orderby'         => 'post_date',
                'order'           => 'DESC'
            );
            $posts_array = get_posts( $args ); 
           ?>       
        <div id="featured" >  
        <ul class="ui-tabs-nav">

            <?php
            $i = 1;
            foreach ($posts_array as $post) :  setup_postdata($post); 
            ?> 
            <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $i; ?>"><a href="#fragment-1"><img src="<?php echo $featured_image; ?>" alt=""/><span><?php the_title(); ?><br /><p class="info" style="padding-left:10px;"><?php the_excerpt(); ?></p></span></a></li> 
            <?php $i++; 
            endforeach; ?>
       </ul>
            <?php
            $i = 1;
            foreach ($posts_array as $post) :  setup_postdata($post); 
            ?>
        <!-- First Content -->  
        <div id="fragment-<?php echo $i; ?>" class="ui-tabs-panel" style="">  
            <img src="<?php the_post_thumbnail('slider_image'); ?>" alt="" />  
            <div class="info" >  
            <h2><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h2>  
            <p><?php the_excerpt(); ?><a href="<?php the_permalink(); ?>" >read more</a></p>  
            </div>  
        </div>  
        <?php $i++; endforeach; ?>


    </div>  

<!--Your slider code goes here-->
<!-- End Featured Lists Image Slider -->        

<?php endif; ?>

        <?php if($featured_image= get_post_meta($post->ID, "featured_image", true)) { ?>
        <div class="postThumbnail"><a href="<?php the_permalink() ?>"><img src="<?php echo $featured_image; ?>" height="190" width="125" border="0" /></a></div>
        <?php } ?>


我不确定这是你问题的根本原因,但这句话:

<img src="<?php the_post_thumbnail('slider_image'); ?>" alt="" />


<img src="<img width="940" height="340" src="http://www.osmproduction.com/RIF/wp-content/uploads/2012/03/MaxBrooksRecordedAttacks-940x340.png" class="attachment-slider_image wp-post-image" alt="MaxBrooksRecordedAttacks" title="MaxBrooksRecordedAttacks" />" alt="" />  
<img src="<?php the_post_thumbnail('slider_image'); ?>" alt="" />
<?php the_post_thumbnail('slider_image'); ?>