WordPress Theme Codes



Hello everone Today i will share wordpress theme code for your theme confiration. If there are wrong these codes please contact me for changing true code

  • Calls Header.php

<?php get_header(); ?>

  • Your theme Text Charset

<?php bloginfo('charset'); ?>

  • Your web site name

<?php bloginfo('name'); ?>

  • Your theme url

<?php bloginfo('template_url'); ?>

  • Your theme css adress
<?php bloginfo('stylesheet_url'); ?>
  • Theme version
<?php bloginfo('version'); ?>
  • Your web site description
<?php bloginfo('description'); ?>
  • Your web site adress
<?php bloginfo('url'); ?>
  • Your web site Url
<?php bloginfo('atom_url'); ?>
  • Your web site RSS adress
<?php bloginfo('rss2_url'); ?>
  • Your web site HTML Version
<?php bloginfo('html_type'); ?>
  • Your theme feed back
<?php bloginfo('pingback_url'); ?>
  • Calls Sidebar.php
<?php get_sidebar(''); ?>
  • Calls Footer.php
<?php get_footer(); ?>
  • if there are a post, list the post
    <?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
  • End while loop
<?php endwhile; ?>
  • Finish end post
<?php endif; ?>
  • Post Title
<?php the_title(''); ?>
  • Post Link
<?php the_permalink(''); ?> 
  • Post Date
<?php the_time('j F Y'); ?>
  • Post Categorys
<?php the_category(', '); ?>
  • Post Tags
<?php the_tags( '', ' ', ''); ?>
  • Post Content
<?php the_content(); ?>
  • Post ID
<?php the_ID(); ?>
  • Post views (need Wp-PostViews )
<?php if(function_exists('the_views')) { the_views(); } ?>
  • Post Comments count
<?php comments_popup_link(<strong>('Yorum yapılmamış'), </strong>('1 yorum yapılmış'), <strong>('% yorum yapılmış'), '', </strong>('Yorumlara kapalı')); ?>
  • Post Edit Link
<?php edit_post_link(); ?>
  • Recently Written Pages Lists
<?php wp_list_pages(); ?>
  • Calendar shows
<?php get_calendar(); ?>

*Shows monthly and yearly archives

<?php wp_get_archives(); ?>

*calls Comments.php

<?php comments_template(); ?>
  • Author name
<?php the_author(''); ?>
  • Author’s informations
<?php the_author_description(''); ?>
  • Author First name
<?php the_author_firstname(''); ?>
  • Author last name
<?php the_author_lastname(''); ?>
  • Number of posts written by the author
<?php the_author_posts(''); ?>
  • Author page link
<?php the_author_link(''); ?>
  • Author web site
<?php the_author_url(''); ?>
  • Author Email
<?php the_author_email(''); ?>
  • Next Post Link
<?php next_post_link(''); ?>
  • Link to Previous Post
<?php previous_post_link(''); ?>
  • Post Image (from the prominent visual)
<?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {} ?>
  • For image, adds into Function.php
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 180, 150);
  • Search Form

<form method="get" id="searchform" action="<?php bloginfo('url'); ?>">
<input class="searchbg" type="text" name="s" id="s" onfocus="if (this.value == 'Arama Yap') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Arama Yap';}" />
<input class="button" type="button" value="" />
</form>