Hallo,
ich bin ein ziemlicher Anfänger in WP und habe mit Hilfe eines Tuts versucht den Nivoslider auf meine Index Seite zu bringen.
Ich habe es soweit geschafft, das der Slider auf der Seite ist und das Lade gif angezeigt wird, weiter aber auch nicht.
Die Bilder und das Menü werden nicht angezeigt.
Die JS und CSS Dateien sind 1:1 aus dem Tutorial, also kann es eig an ihnen nicht legen.
Muss ich mehr machen als nur den Code eingeben oder ist was am code falsch?
index.php
HTML
<div id="slider">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
if ( has_post_thumbnail() ) {
echo '<a href="';
the_permalink();
echo '">';
the_post_thumbnail('slider-image', array( 'alt' => get_the_title(), 'title' => get_the_title() . "<br /> <span>" . get_the_excerpt() . "</span>"));
echo '</a>';
}
?>
<?php endwhile; ?>
<?php else : ?>
<h2>Not Found</h2>
<?php endif; ?>
</div>
Alles anzeigen
functions.php
HTML
<?php
// Add RSS links to <head> section
automatic_feed_links();
// Load jQuery
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
wp_enqueue_script('jquery');
}
// Clean up the <head>
function removeHeadLinks() {
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
}
add_action('init', 'removeHeadLinks');
remove_action('wp_head', 'wp_generator');
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Sidebar Widgets',
'id' => 'sidebar-widgets',
'description' => 'These are widgets for the sidebar.',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
//Add Custom Menu
add_theme_support('nav-menus');
//Add post thumdbnail
add_theme_support( 'post-thumbnails', array( 'post' ) );
set_post_thumbnail_size(220, 9999);
add_image_size('slider-image', 780, 320, true );
?>
Alles anzeigen
header.php
PHP
!-- Include the Nivo Slider CSS file -->
<link rel="stylesheet" href="<?php bloginfo("template_url"); ?>/slider/css/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo("template_url"); ?>/slider/css/custom-nivo-slider.css" type="text/css" media="screen" />
<!-- Include the Nivo Slider JS file -->
<script src="<?php bloginfo("template_url"); ?>/slider/js/jquery.nivo.slider.pack.js" type="text/javascript"> </script>
<!-- Set up the Nivo Slider -->
<script type="text/javascript">
jQuery(window).load(function() {
jQuery('#slider').nivoSlider({
effect:'fold',
manualAdvance:true,
});
});
</script>
Alles anzeigen
Gruß Basti