WordPress

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; endif; ?>

<?php title(); ?>
<?php content(); ?>
<?php template_url(); ?>

<?php
query_posts(‘cat=1’);
while (have_posts()) : the_post();
the_content();
endwhile;
?>

<?php query_posts(‘category_name=’.get_the_title().’&post_status=publish,future’);?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h1>
<p><?php the_content(); ?>
<?php endwhile; else: endif; ?>
—————————————————————————

* Display post with single category :
<?php query_posts(‘category=category-slug-name’); ?>

<?php query_posts(‘cat=8&showposts=4’); ?>

<?php query_posts(‘category_name=Staff Home’); ?>
<?php if (is_home()) {
query_posts(“cat=-3″);
} ?>
Retrieve a Particular Page
<?php query_posts(‘page_id=7’); ?>

<?php query_posts(‘pagename=about’); ?>

<?php query_posts( ‘posts_per_page=5’ ) ?>

———————————————————————
<?php
$category_id = get_cat_ID(‘Referral’);
$q = ‘cat=’ . $category_id ;
query_posts($q);
$catname=get_cat_name( $category_id );
if( $posts ) :
while (have_posts()) : the_post();
?>
<h1><?php the_title(); ?></h1>
<div class=”blog1″>
<div class=”blog_content”><?php content(’27’); ?>
<div class=”blog_read”>
<?php echo new_excerpt_more1($more); ?>
</div>
</div>
</div>
<?php endwhile; endif; ?>
*******************************************************
Dynamic post :

<div class=”box_mid”>

<?php $cat_id = get_cat_ID(‘post_cat1’); ?>
<?php query_posts(“cat=”.$cat_id);
$i=1;
if(have_posts())
{
while ( have_posts() ) : the_post(); ?>
<div class=”box<?php echo $i; ?>”>
<div class=”box1top”><img src=”<?php echo get_template_directory_uri(); ?>/images/ban-top<?php echo $i; ?>.gif” /></div>
<div class=”box<?php echo $i; ?>main”>
<h1><?php the_title();?></h1>
<?php the_content(); ?>

<div class=”box<?php echo $i; ?>_readmore”>Read more</div>
</div> </div>
<?php //break; ?>
<?php $i++;endwhile; } ?>

</div>

*************************************************************

For testimonials : Widgets

Open function.php ->

register_sidebar( array(
‘name’ => __( ‘Footer Area Three’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-5’,
‘description’ => __( ‘An optional widget area for your site footer’, ‘twentyeleven’ ),
‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => “</aside>”,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );

* see the code
* copy and paste then change name Footer Area three & replace name testimonials
* also change id – testi-1
* then go in backend
* click on widgets
* drag tb-testimonials & drop in testimonials sidebar.
* then put the code which u want.

<?php if ( !dynamic_sidebar(‘testi-1’) ) : ?>
<?php endif; ?>

**** For footer coding :

<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Footer’) ) : ?>
<li></li>
<?php endif; ?>

————————————————————————————–

display widget in wordpress: write in google

<?php if ( !dynamic_sidebar(‘testi-1’) ) : ?>
<?php endif; ?>

******************************************************************
how to dyhanic header image :

<img src=”<?php header_image(); ?>” />

————————————————————————————————–
Page link Code :

<a href=”<?php echo get_page_link(40); ?>”>Map</a>
———————————————————————————————
For search bar – link – searchform.php

http://rockstartemplate.com/blog-resources/blog-tips-and-tricks/add-search-bar-in-wordpress-blog/

————————————————————————————————————

subtitle plugin – link – http://wordpress.org/extend/plugins/tags/subtitle

The Subtitle
WP Subtitle
Visual Subtitle

————————————————————————————————————-

<?php get_sidebar(‘left’); ?> <?php get_sidebar(‘right’); ?>

<?php get_sidebar(‘left’); ?> and <?php get_sidebar(‘right’); ?>
******************************************************************
code for index page :

<?php if ( have_posts() ) : ?>
<?php get_template_part( ‘content’, get_post_format() ); ?>
<?php endif; ?>
**************************************
for feartured image- thumbnail – code

<?php echo get_the_post_thumbnail(); ?>

———————————————————————-

readmore content – code

<?php the_content(”); ?>

————————————————————————

multiple image – code

<?php the_permalink() ?>
___________________________________________
<?php bloginfo(‘template_url’);?>/ -> image
______________
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?> ->menu

____________________
<?php query_posts( array ( ‘category_name’ => ‘aboutus’) );

while ( have_posts() ) : the_post();
the_content();

endwhile; ?> ->post call content

 

===================

Theams

 

http://www.s5themes.com/

http://shinywp.com/page/2/

http://wplift.com/tag/free-wordpress-themes