Category Archives: Tutorial

How View the WordPress latest post checkup code in home page?


Hi guys this the latest post view in home page only. In the single page not working this. <?php $u_time = get_the_time(‘U’); $u_modified_time = get_the_modified_time(‘U’); //Current Post Checkup Start $week = date(‘W’); $year = date(‘Y’); $query = new WP_Query( ‘year=’ . $year . ‘&w=’ . $week ); //echo $query->current_post; //if […]

Continue reading...

How to Create Word Press Sitemap?


Hi Guys I previously explained XML Site map, now i explained WordPress sitemap. You functions.php and but below code, This is archives link : // Sitemap  14 Feb 2012 function month_displayArchives() { global $month, $wpdb, $wp_version; // a mysql query to get the list of distinct years and months that […]

Continue reading...

How to Create You WordPress XML Sitemap?


Hi go your wordpress theme functions.php, Then put your below code for xml site map purpose : /* function to create sitemap.xml file in root directory of site  */ //add_action(“publish_post”, “eg_create_sitemap”); //add_action(“publish_page”, “eg_create_sitemap”); add_action(“save_post”, “eg_create_sitemap”); function eg_create_sitemap() { $postsForSitemap = get_posts(array( ‘numberposts’ => -1, ‘orderby’ => ‘modified’, ‘post_type’  => array(‘post’,’page’), […]

Continue reading...

How to check current post today date in Word Press?


Hi you go and use below code this useful for you. <?php $u_time = get_the_time(‘U’); $u_modified_time = get_the_modified_time(‘U’); //Current Post Checkup Start if (($wp_query->current_post < 1)&&($u_modified_time == $u_time)) { ?> <div> <?php $page_name = array(74); $welcome_data = get_page($page_name[0]); ?> <!– h1><a href=”<//?php echo get_permalink($welcome_data->ID); ?>”>Private Lessons</a></h1 –> <?php echo $welcome_data->post_content; […]

Continue reading...

How Current Post Checkup in WP?


Hi this just fun and good easy code enjoy all peoples : <?php //Current Post Checkup Start if ($wp_query->current_post < 1) { ?> <div> <?php $page_name = array(74); $content_data = get_page($page_name[0]); ?> <h1><a href=”<//?php echo get_permalink($content_data->ID); ?>”>Private Lessons</a></h1> <?php echo $content_data->post_content; ?> </div><!– Special Box Content End –> <?php } […]

Continue reading...

How to Display Recent Posts with Summary?


Hi Just Use below Code: <ul> <?php query_posts(‘showposts=5’); ?> <?php while (have_posts()) : the_post(); ?> <li><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></li> <li><?php the_excerpt(__(‘(more…)’)); ?></li> <?php endwhile;?> </ul>   This is Search in google and get it. Its work for me. You change any latest post query, its fine for you.

Continue reading...

How to Change Comments “Leave a reply” Text?


I Search this and find Two More Option? Your Side check this working or Not. 1. You go Function.php add Below Code : /** Comments Title Change **/ function comment_reform ($arg) { $arg[‘title_reply’] = __(‘Leave a comment or question’); return $arg; } add_filter(‘comment_form_defaults’,’comment_reform’); 2. Go to comments.php and Found This […]

Continue reading...

My First PHP Code?


<?php (or) <? –> This Open Tags ?> –> This is Close Tag. The Above Code for php start and close tag. Basic Code : <?php echo “Welcome, My First PHP Code.”; //This is use for print the content purpose ?>

Continue reading...

What is PHP?


PHP means for PHP:- Hypertext Preprocessor PHP is more powerful dynamic web languages You need to learn PHP, First You Want Learn Below Basic Languages : HTML Javascript PHP is Server Side Scripting Language, PHP is executed on the Server PHP is Open Source Software PHP file using HTML tags […]

Continue reading...

What is HTML?


HTML stands for Hyper Text Markup Language The HTML is not a programming language, it is a markup language, This is used for Webpage   Markup purpose. HTML documents contain HTML tags and plain text Basic HTML Tags : <html> <head> <title>My Basic Title Tag</title> </head> <body> <h1>I am First Head […]

Continue reading...