Wsparcie » Używanie i konfiguracja WordPressa » Slider zintegrowany z wpisami…

  • Witam pobrałem sobie darmowy szablon, taki http://demo.fabthemes.com/quora/

    Potrzebuje pomocy ponieważ tutaj jest tak, że jak dodam ikonę wpisu to automatycznie idzie ona do slidera. Chciałbym po prostu, aby była ikona wpisu, ale żeby nie szła do slidera. W sliderze chciałbym mieć swoje np 3 obrazki.

    Pomógłby ktoś zmodyfikować to ?

    Tutaj jest kod ze sliderem.

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package web2feel
     * @since web2feel 1.0
     */
    
    get_header(); ?>
    
    		<div id="wideslider" class="flexslider">
    		<ul class="slides">
    		    <?php 	$count = of_get_option('w2f_slide_number');
    					$slidecat =of_get_option('w2f_slide_categories');
    
    					$query = new WP_Query( array( 'cat' =>$slidecat,'posts_per_page' =>$count ) );
    		           	if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();	?>
    
    			 		<li>
    
    					<?php
    						$thumb = get_post_thumbnail_id();
    						$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
    						$image = aq_resize( $img_url, 960, 400, true ); //resize & crop the image
    					?>
    
    					<?php if($image) : ?>
    						<a href="<?php the_permalink(); ?>"><img src="<?php echo $image ?>"/></a>
    					<?php endif; ?>
    
    					<div class="flex-caption">
    						<h2><?php the_title(); ?></h2>
    					</div>
    			<?php endwhile; endif; ?>
    
    		  </li>
    		</ul>
    	</div>
    
    		<div id="primary" class="content-area">
    			<div id="content" class="site-content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				<div class="paginate ">
    					<?php kriesi_pagination(); ?>
    				</div>
    
    			<?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
    
    				<?php get_template_part( 'no-results', 'index' ); ?>
    
    			<?php endif; ?>
    
    			</div><!-- #content .site-content -->
    		</div><!-- #primary .content-area -->
    
    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Wnioskując po kodzie, w ustawieniach motywu powinien być wybór kategorii dla slidera – możesz więc stworzyć sobie jakąś dedykowaną kategorię tylko pod ten slider.

    No chyba, że chcesz na sztywno ….wówczas coś w ten deseń http://pastebin.com/bcYz1zp1

    Thread Starter Nerox

    (@nerox)

    Dzięki za odpowiedź.

    Właśnie chciałem nową kategorię, ale mam taki problem, że te posty w których daje obrazki do slidera jakby i tak się wyświetlają na głównej, a ja ich nie chcę.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Temat ‘Slider zintegrowany z wpisami…’ jest zamknięty na nowe odpowiedzi.