Wordpress:Show posts ordered by Title


<table>
<?php
$postslist = get_posts('cat=category-ID&numberposts=-1&order=ASC&orderby=title' );
foreach ($postslist as $post) :
    setup_postdata($post);


 $post_custom_field = get_post_meta($post->ID, "post_image", true); 
?>


<tr>
          <td valign="top" width="26%"><img src="<?php bloginfo('template_directory'); ?>/images/
<?php echo $post_custom_field;?> " width="120" height="90"></td>
          <td class="introcopy" valign="top" width="72%"><strong><?php the_title();?></strong><br>
           <?php the_content();?></td>
          <td width="2%" height="98">&nbsp;</td>
        </tr>
<?php endforeach; ?>
</table>

Make Wordpress Blog Live

Making a blog live (from test location to root or LIVE location)

a. Make sure you have FTP/sFTP access to the existing WP installation files
b. Make sure you have FTP/sFTP access to the "new" WP installation files which needs to go live
c. Make sure you have access to the databases or PHPMyAdmin for both the installations
d. Make sure you have Admin access to backend/CMS to both the installations.

#A Connect VIA FTP
1. Create a new folder /old-wp-MMMYY/ )
2. Move the existing WP installation files from root (or from the folder where it is currently installed) to /old-wp-MMMYY/
3. Move all the WP installation files from "new" folder to root  (or the folder where it is to be installed, from where you moved the existing files)
4. Open the "new" database and go to wp_options table (note: if you'd changed the prefix in config.php, you'll see that instead of just wp_)
5. In this table, change values for siteurl & home to match the current WP installation (whether root or folder)
6. Repeat step 4 & 5 for the installation in /old-wp-MMMYY/ so that it is now accessible on this new location.
7. Via ftp, browse to the wp-content/themes folder and double check theme files for hard coded links - correct the paths to match the new location.
8. Now, browse to the new installation via web and test if everything is working fine in IE / Chrome / FF/ Safari
9. Log into the admin of the new installation and check if you need to update the admin email address etc to match that of the client. Make sure you do not get any plugin errors etc.
10. In Admin, Go to Pages > Add New and try uploading any media file - you should not get any folder permission errors. If you do, check folder permissions.
11. Delete your test media file after it successfully uploads.
12. Cross check all emails and undo anything that you'd done in test location which doesn't match the live site - e.g. you may have blocked search engines form indexing this site or changed admin email or password etc.
13.Change the path of upload file in wp_option folder,If not correct.
14.If you have changed the table prefix, then edit the entries in wp_option folder and wp_user_meta table (wp_user_role, wp_capabilities,wp_user_level).
15. You're done!

To create Newsletter email Template:

<?php

    $to = "youremail@domain.com";
    $from = "homedomain.com";
    $subject = "Newsletter E-mail";
    $message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Bahamas::</title>
<style type="text/css">
</style></head>

<body>
<table width="667" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td></td>
</tr>
</table>
</body>
</html>
';
    $headers  = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    mail($to, $subject, $message, $headers);

    echo "E-mail has been sent to..... !".$to;
?>




Note:  In Newsletter which you have to send on email.You have to give the absolute url addres as   domain.com/images/image.jpg.

Older Or Newer Post Links:


<div class="pnavigation">
                <p class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?>
                </p>
                <p class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?>
                </p>
        </div>

Javascript header navigation for Wordpress


<?php wp_enqueue_script('jquery'); ?>
      <script type='text/javascript'>
            jQuery(document).ready(function() {
            jQuery("#topNavigation ul").css({display: "none"}); // Opera Fix
            jQuery("#topNavigation li").hover(function(){
         jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(268);
        },function(){
         jQuery(this).find('ul:first').css({visibility: "hidden"});
        });
});
      </script>
</head>
<body>
<div id="nagivation">
    <ul id="topNavigation">
      <li><a href="<?php bloginfo('home'); ?>/beta/press-kit/"
        onmouseover="mopen('m1')"
        onmouseout="mclosetime()">PRESS KIT</a>
        <ul id="m1"
            onmouseover="mcancelclosetime()"
            onmouseout="mclosetime()">   
                  <?php wp_list_pages('child_of=7&title_li='); ?>
            </ul>
    </li>
    <li><a href="<?php bloginfo('home'); ?>/photo-graphics/"
        onmouseover="mopen('m2')"
        onmouseout="mclosetime()">PHOTO &amp; GRAPHICS</a>
        <ul id="m2"
            onmouseover="mcancelclosetime()"
            onmouseout="mclosetime()">   
                  <?php wp_list_pages('child_of=9&title_li='); ?>
            </ul>
    </li>
    <li><a href="<?php bloginfo('home'); ?>/press-releases/">PRESS RELEASES</a>
      
    </li>
    <li><a href="<?php bloginfo('home'); ?>/in-the-news/">IN THE NEWS</a></li>
    <li><a href="<?php bloginfo('home'); ?>/free-articles/">FREE ARTICLES</a></li>
    <li><a href="<?php bloginfo('home'); ?>/media-alerts/">MEDIA ALERTS</a></li>
    <li style="border-right:none;"><a href="<?php bloginfo('home'); ?>/about-franchising/">ABOUT FRANCHISING</a></li>
</ul> 

Wordpress child theme creation

Child theme different concept in "Wordpress".
Child theme is the inherited properties theme.Means:-It inherite the properties of basic theme or default theme.

Basic Files needed:
basic file needed in child theme is style.css.

Facts:
If you create a new function.php in child theme then parent theme function.php get combined with child theme's function.php.So if you need new functions in child theme the create function.php with new functions.

Needed:
In style.css you need to write at top something as-


/*
*Theme Name:Themename
*Theme URI: Themename's-homepage
*Description: brief-description
*Author: your-name
*Author URI: your-URI
*Template: use-this-to-define-a-parent-theme--optional
*Version: a-number--optional
*/