06-07-2013, 12:05 | #1 |
|
WordPress Tema kodları
1-
Kod:
<?php bloginfo('template_url'); ?> 2- Kod:
<?php bloginfo('siteurl');?> 3- Kod:
<?php get_header(); ?> 4- Kod:
<?php get_sidebar(); ?> 5- Kod:
<?php get_footer(); ?> 6- Kod:
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?> 7- Kod:
<?php query_posts('showposts=8&cat=1');?> <?php while (have_posts()) : the_post(); ?> Kod:
<?php endwhile; ?> 8- Kod:
<?php the_permalink() ?> 9- Kod:
<?php the_title(); ?> 10- Kod:
<?php if(function_exists('the_views')) { the_views(); } ?> 11- Kod:
<?php the_category(', '); ?> 12- Kod:
<?php the_tags(' ', ', ', ''); ?> 13- Kod:
<?php if( get_post_meta($post->ID, "resim", true) ): ?> <?php echo get_post_meta($post->ID, "resim", true); ?> <?php else: ?> <?php endif; ?> 14- Kod:
<?php the_content_rss('', TRUE, '', 10); ?> 15- Kod:
<?php $my_query = new WP_Query('orderby=rand&showposts=15'); while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?> Kod:
<?php endwhile; ?> 16- Kod:
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> Kod:
<?php endwhile; ?> <div class='sayfalama'><?php wp_pagenavi() ?></div> <?php else : ?> <div class="alignleft"><?php next_posts_link(__('« Older Entries')) ?></div> <div class="alignright"><?php previous_posts_link(__('Newer Entries »')) ?></div> <div class="clear"></div> <?php endif; ?> 17 - Kod:
<?php if (have_posts()) : while (have_posts()) : the_post(); $do_not_duplicate = $post->ID; ?> içerik kodu <?php the_content(''); ?> <?php endwhile; else : endif; ?> 18- Kod:
<?php the_content(''); ?> 19- Kod:
<?php comments_template(); ?> 20- Kod:
<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Anasayfa</a></li> <?php wp_list_categories('depth=3&child_of=1&hide_empty=0&orderby=name&show_count=0&use_desc_for_title=1&title_li='); ?> 21- Kod:
<?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,30) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 10"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; $output .= "\n<ul>"; foreach ($comments as $comment) { $output .= "\n<li>".strip_tags($comment->comment_author) .":" . "<a href=\"" . get_permalink($comment->ID)."#comment-" . $comment->comment_ID . "\" title=\"on ".$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."</a></li>"; } $output .= "\n</ul>"; $output .= $post_HTML; echo $output; ?> 22- Kod:
<?php $wp_query = new WP_Query(); $wp_query->query('showposts=5&cat=-416&paged='.$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> içerik gelicek <?php endwhile; ?> 23- Kod:
<?php wp_link_pages('before=<p>&after=</p>&pagelink=%.Bölüm'); ?> 24- Kod:
<?php the_time('l, F jS, Y') ?> 25- Kod:
<?php the_author(', '); ?> 26- Kod:
<?php the_category(', '); ?> 27- Kod:
<?php previous_post_link('%link') ?> Önceki Link <?php next_post_link('%link') ?> İlgili içerik yerleştirildiğinde o içerikten önceki ve sonraki konuların linkini verir. 28- Kod:
<?php $args=array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ ); $categories=get_categories($args); $cat_count = 0; foreach($categories as $c) { $cat_count++; } $count_posts = wp_count_posts(); $published = $count_posts->publish; ?> 29- Kod:
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> 30- Kod:
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title> 31- Kod:
<?php comments_number('0 Yorum','1 Yorum','% Yorum'); ?>
__________________
Kullanmak istedim adın yazan her maddeyi. |
Alıntı |
Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
|
|