IT Nursery
I have read a number of questions on SE regarding these but I still can’t figure the exact difference wrt usage. Would it be true to say that I...
  • April 20, 2022
  • 0 Comments
IT Nursery
I have to get specific page content (like page(12)) I used that : <?php $id=47; $post = get_page($id); echo $post->post_content; ?> Work nice execpt for compatibility with qtranslate it...
  • April 20, 2022
  • 0 Comments
IT Nursery
I have this custom post query to list all the posts within a specific category. For example I have this: $args = array('cat' => 'home','post_type' => 'post')); $post_obj =...
  • April 19, 2022
  • 0 Comments
IT Nursery
I’m looking for an solution how I can count and display all queries in a WordPress site. Does anybody know, if there is an good plugin? Otherwise it would...
  • April 17, 2022
  • 0 Comments
IT Nursery
Here is how I am getting the views for one post: function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0...
  • April 15, 2022
  • 0 Comments
IT Nursery
Been all over looking for the best way to do this. I want to get the ID of the latest post of a certain post_type. How can I do...
  • April 15, 2022
  • 0 Comments
IT Nursery
Here is my code $my_wp_query = new WP_Query(); $all_wp_pages = $my_wp_query->query(array('post_type' => 'page','post_parent'=>$parid,'orderby'=>'title','order'=>'ASC' )); It displays the first level sub pages only. I need all the sub page, sub’s...
  • April 12, 2022
  • 0 Comments