get only 1 wpdb and get taxonomy, post to next page [closed]

For 1st question $args = array( ‘post_type’ => ‘us_visa’, ‘posts_per_page’ => -1, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘meta_query’ => array( array( ‘key’ => ‘_Passport’, ‘value’ => $passport_num, ) ) ); $query = new WP_Query( $args ); See Custom Field Parameters of WP_Query on Codex For 2nd question, inside the loop use <?php the_terms( get_the_ID(), … Read more

WordPress Role Capability Restriction

The following excludes posts not written by the user from the edit-post screen (you can add further screen IDs if necessary) if they have the ‘contributor’ role. Normally I would suggest adding a custom capability, and comparing the capability not the role. But since it seems this plug-in isn’t for distribution, this is isn’t such … Read more

jQuery issue and wp_enqueue_script

Best practise while developing a WordPress theme is to always use the jquery included in WP. So deregister it and use a cdn hosted version should be avoided. This is a required practise, e.g. to include themes in wordpress repository and also some famous themes marketplaces (like themeforest) at this time do not accept themes … Read more

Subpages menu on sidebar plus widgets

If I’m understainding you correctly, you’ve hardcoded the wp_list_pages() function in to the widgetized area of the theme’s sidebar, and then, when you add a widget using WordPress’ back end Appearance->Widgets then you no longer see the output of the wp_list_pages() function? If that’s the case, then I think we’ve found your problem. If code … Read more

How To Conditionally Change Menu In Same Theme Location

Yes, You can easily switch menus using conditional tags. For example If you want to show different menu for logged in user and non-logged in user then It may be like: <?php if ( is_user_logged_in() ) { wp_nav_menu( array( ‘theme_location’ => ‘logged-in-menu’ ) ); } else { wp_nav_menu( array( ‘theme_location’ => ‘logged-out-menu’ ) ); } … Read more

How do I create a template page to show 3 blog posts?

before start your posts loop in a custom page template you need to get posts from database by using wp_query() or get_posts() do some thing like this. $args = array( ‘posts_per_page’ => 3 ); $my_query = new WP_Query($args); // now start your loop if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); // … Read more