Aklıma her şeyi denedim. Bu kadar zor olmamalı. Bazı biri bana WordPress (özellikle jQuery Cycle Plugin) ile jQuery kullanarak sürecini açıklayabilir misiniz?
header.php var:
<?php
wp_enqueue_script('jquery.cycle.all.min', '/wp-content/themes/andrewhavens/jquery.cycle.all.min.js', array('jquery'));
wp_enqueue_script('featured-work-slideshow', '/wp-content/themes/andrewhavens/featured-work-slideshow.js');
wp_head();
?>
Ben temanın dizinine bu iki js dosyaları yükledik.
Özellikli-iş-slideshow.js I var:
jQuery(document).ready(function($) {
$('#featured-works').cycle('fade');
});
Ve şablonunda, ben var:
<div id="featured-works">
<?php query_posts('category_name=featured-work&showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="featured-work">
<div class="featured-work-image-container" style="float:left; width:600px;">
<?php $image = get_post_meta($post->ID, 'homepage-image', true); ?>
<img src="<?php echo $image; ?>" width="500" height="300" style="margin-left:30px;">
</div>
<p style="float:left; width:300px;">
<?php the_title(); ?><br />
<a href="<?php the_permalink() ?>">Read More!</a>
</p>
</div>
<?php endwhile;?>
</div>
Ben yanlış ne yapıyorum??