Blumish Posted December 16, 2010 Report Share Posted December 16, 2010 Sveiki! Man irviens jautaajums. Saadi izskataas mans wordpres dizains..: Saakum lapaa radaas pedeejie 15 pievienotie rakti: to nosaukumi. Man vajadzeetu lai radiitu pedeejos piecus rakstus ar visu informaaciiju: raksta satturu,un pareejos 10 sadaa pat stabinu seciibaa tikai ar nosaukumiem... Luuk ir galvenais fails kas izvada rakstus: <?php get_header(); ?> <div id="layout"><!-- BEGIN LAYOUT --> <div class="layout-left"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Main Column') ) : else : ?> <div class="nowidget"><b>MAIN COLUMN</b>: <a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets"><b>Add Widgets</b></a></div> <?php endif; ?> </div> <div class="layout-middle"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Secondary Column') ) : else : ?> <div class="nowidget"><b>SECONDARY COLUMN</b>: <a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets"><b>Add Widgets</b></a></div> <?php endif; ?> </div> <div class="layout-right"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Side Column') ) : else : ?> <div class="nowidget"><b>SIDE COLUMN</b>: <a href="<?php echo get_settings('home'); ?>/wp-admin/widgets.php/" target="_self" title="Click to add widgets"><b>Add Widgets</b></a></div> <?php endif; ?> </div> </div><!-- END LAYOUT --> <?php get_footer(); ?> Ludzu kadu izlabot so failu un lai rezultats butu lidzig sim: Paldies jau ieprieks.. forumam.bmp Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 16, 2010 Report Share Posted December 16, 2010 tas ir darba piedavajums? tad nepareizā sadaļa. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted December 16, 2010 Report Share Posted December 16, 2010 http://php.lv/f/forum/42-darbs/ Quote Link to comment Share on other sites More sharing options...
Blumish Posted December 16, 2010 Author Report Share Posted December 16, 2010 Varbutkads zinatajs var parbrivu izveidot? Quote Link to comment Share on other sites More sharing options...
foxsk8 Posted December 16, 2010 Report Share Posted December 16, 2010 Pirmais jau kas, tev ir jāuztaisa wp loop while cikls, ar count 5, plus jāizvada ārā content saturs. Pirmajiem pieciem būs full, bet pārējiem būs tikai title ar linku. Šaubos, vai kāds no zinošiem gribēs līdzēt par velti, skarbi bet tā tas ir. Mums labāk, varbūt ne labāk, patiktu tev palīdzēt pašam to izdarīt, pa pavedienam šķetinot kodu, utt.. nevis to darīt for free, vai kā savādāk. Un velns rakstot radās tev risinājums: <?php if (have_posts()) : ?> <?php $count = 0; ?> <?php while (have_posts()) : the_post(); ?> <?php $count++; ?> <?php if ($count <= 2) : ?> // Noradam cik ierakstiem paradit pilno saturu <h2><a class="permalink" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?></a></h2> <?php the_content(); ?> // Paradam pilno saturu diviem pirmajiem ierakstiem <?php else : ?> <h2><a class="permalink" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?></a></h2> // Parējie linki <?php endif; ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> Quote Link to comment Share on other sites More sharing options...
Blumish Posted December 17, 2010 Author Report Share Posted December 17, 2010 Sveiks foxsk8 Kautkas nav, ievietoju tavu kodu savā lapā starp <?php get_header(); ?> un <?php get_footer(); ?> (lai butu dizains), bet kods nedarbojas. Pie count noradīju 5, bet radās visi pārējie arī, zem siem pieciem neveidojas pārējo rakstu lists. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.