How reterive page/post/category detail ?

Use this code for reterive page detail. <ul id=”red”> <?php global $wpdb; $curent_id =$post->ID; $myPages = $wpdb->get_col(“SELECT ID,guid FROM $wpdb->posts WHERE post_parent =’$curent_id’ AND post_status=’publish’ AND post_type=’page’”); foreach($myPages as $myPagess ) { $numberPages = $wpdb->get_var(“SELECT count(*) FROM $wpdb->posts WHERE post_parent =’$myPagess’ AND post_status=’publish’ AND post_type=’page’”); if($numberPages==0) { echo “<li><span><a href=’”.get_permalink($myPagess).”‘>”.get_the_title($myPagess).”</a></span></li>”; } else { //echo “SELECT …

WordPress -How Retrieve Current User detail and logout link in your wordpress site

Hi Guys , You can retrieve any User Logged detail  on your site. follow just these steps given below. Take backup of your file before change on it Adde this code any where you want add this (i.e footer.php, header.php) <div id=”menutop”>  <p style=”text-align: right”><?php if ( is_user_logged_in() ) { ?>   Welcome:   <?php global $current_user;             …