Odpowiedź forum utworzona

Viewing 8 replies - 1 through 8 (of 8 total)
  • Forum: Motywy
    W odpowiedzi na: Problem z wyświetlaniem wpisów
    Twórca wątku nnww

    (@nnww)

    Winowajca:
    $category = get_the_category();

    Forum: Motywy
    W odpowiedzi na: Problem z wyświetlaniem wpisów
    Twórca wątku nnww

    (@nnww)

    To pewnie będzie to:

    <?php
    /**
     * The template for displaying Category Archive pages.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); 
    
    $category = get_the_category();
    
    if($category[0]->cat_ID==23) $args = array('cat'=>$category[0]->cat_ID,'meta_key'=>'sequence','orderby'=>'meta_value','order'=>'ASC'); else
    $args = array('cat'=>$category[0]->cat_ID,'orderby'=>'date','order'=>'DESC');
    
    query_posts(  $args , $wp_query->query );
    ?>
    
    		<div class="category">
    
    			<?php if ( have_posts() ) : ?>
    
    			<h1 class="category_title"><?php echo single_cat_title( '', false ); ?></h1>
    
    			<div class="category_desc"><?php echo category_description('') ;?> </div>
    			<hr id="logo_hr"/>
    
    </div>	
    
    				 		<div id="category">
    
    				<?php /* Start the Loop */
    				switch($category[0]->cat_ID)
    				{
    					case 4:
    					$thumb_size=220;
    					break;
    					case 5:
    					$thumb_size=220;
    					$more="";
    					break;
    					default:
    					$thumb_size=220;
    					break;
    				}
    				?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    						 			<!-- category Content -->
    			<div id="category_content" >
    						 				<!-- category Articles -->
    				<div style="position: relative; " id="spotlight">
    
    											<div style="position: relative; top: 0px; left: 0px; display: block; opacity: 1;" class="slide">
    							<h1 <?php if($category[0]->cat_ID==5) echo 'style="font-size:1.7em;"'; ?> > <?php the_title(); ?></h1>
    							<br class="clear">
    
    		<?php if ( has_post_thumbnail() ) :?> <a href="<?php the_permalink(); ?>" title="<?php echo get_the_title(); ?>">
    		<?php
    					$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 750,750 ), false, '' );
    					$thumbnailSrc = $src[0];
    		?>
    							<img src="<?php bloginfo('template_directory'); ?>/include/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=<?php echo $thumb_size;?>&w=<?php echo $thumb_size;?>&zc=1&q=100" class="category_img" alt="<?php the_title(); ?>">
    						</a>			
    
    			<?php else : 	//the current post does not have a thumbnail, do something else? ?>
    			<?php endif; ?>
    
    				<div class="category_content" >
    						<?php the_content('<span class="readmore_c">'.__( 'More', 'twentyeleven' ).'&rarr; </span>'); ?>
    
    				</div>
    
    </div>
    </div>
    
    									<!-- End category Articles -->
    											</div>
    			<!-- End category Content -->
    
    						 <?php
    
    		//				get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    
    		</div>
    
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    <?php get_footer(); ?>

    Forum: Motywy
    W odpowiedzi na: Problem z wyświetlaniem wpisów
    Twórca wątku nnww

    (@nnww)

    Dzięki za odpowiedź.
    Gdzie znajdę ten kod?

    Twórca wątku nnww

    (@nnww)

    Wielgachne dzięki! Działa!
    Mam jeszcze problem, bo dodatkowy link włazi na poniższą grafikę, ale to juz w css ogarnę.

    Raz jeszcze dziękuję i pozdrawiam 🙂

    Twórca wątku nnww

    (@nnww)

    Chciałbym dodać link, pod już istniejącymi trzema.

    Twórca wątku nnww

    (@nnww)

    Dzięki! Chyba znalazłem i będzie wywołane w php. Gdzie zatem można to edytować?

    `<p>Polecane świadczenia</p>
    <ul id=”services-list”>
    <?php query_posts(’posts_per_page=3&cat=15&orderby=ID&order=ASC’); ?>
    <?php while (have_posts()) : the_post(); ?>
    <li><a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_title(); ?><img src=”<?php bloginfo(’template_directory’); ?>/style/css/images/buttons/more-button.png”></a></li>
    <?php endwhile; ?>
    </ul>`

    Twórca wątku nnww

    (@nnww)

    To cały kod z tego pliku:

    <!-- ! :: Sidebar :: -->
    			<!-- ================================================= -->
    
    			<!-- :: Sidebar Menu Wrap :: -->
    			<div id="sidebar-menu-wrap">
    
    				<!-- :: Sidebar Menu :: -->
    				<div id="sidebar-menu-box">
    
    					<!-- :: Sidebar Menu Title :: -->
    					<div id="sidebar-menu-title">
    
    					</div>
    
    					<!-- :: Sidebar Menu Content :: -->
    					<div id="sidebar-menu-content">
    
                <ul id="sidebar-menu">
    
    <?php
      if($post->post_parent)
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      else
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
      <ul>
      <?php echo $children; ?>
      </ul>
      <?php } ?>
    
                </ul>
    
    						<p class="powrot"><a href="javascript:history.go(-1)">&laquo; Powróć do poprzedniej strony</a></p>
    
    					</div>
    
    				</div>
    
    		  <!-- :: Sidebar Menu Footer :: -->
          <div id="sidebar-menu-footer">
    
          </div>		
    
    		</div>
    
        <!-- :: End Sidebar :: -->
    Twórca wątku nnww

    (@nnww)

    Sprawdzałem i chyba to nie tam.
    Tutaj screen panelu z widgetami

Viewing 8 replies - 1 through 8 (of 8 total)