How to get top parent page ID in wordpress

The solution to get the top parent page id is here, it is quite easy without using any recursion function. function get_top_parent_page_id() { global $post; // Check if page is a child ...

Add/Remove unwanted links from wordpress admin bar

Remove links from wordpress admin bar: Given below code remove the wordpress logo and other links from the admin bar. function annointed_admin_bar_remove() { global $wp_admin_bar; /* ...

Remove unwanted menu/submenu links from wordpress dashboard

Remove menu page links: function remove_menus() { global $submenu; remove_menu_page( ‘link-manager.php’ ); // Links remove_menu_page( ‘edit-comments.php’ ); ...

Get customize categories in wordpress

The following example will show the categories with checkbox <?php $args=array( ‘child_of’ => ‘1’, ‘hide_empty’ => ‘0’ ); $categories ...

Add Custom Post Type Counts to the Dashboard

we have several ways to add custom post type counts to the dashboard including right_now_content_table_end. For Example: function add_area_counts() { if (!post_type_exists(‘escorts’)) ...
© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie