Restore original WP admin bar after BuddyPress install [closed]
Since buddypress 1.5 you can use: define( ‘BP_USE_WP_ADMIN_BAR’, true ); I use it in bp-custom.php although it can go in wp-config.php
Since buddypress 1.5 you can use: define( ‘BP_USE_WP_ADMIN_BAR’, true ); I use it in bp-custom.php although it can go in wp-config.php
This code will do the job… <?php add_action(‘pre_get_posts’, ‘filter_posts_list’); function filter_posts_list($query) { //$pagenow holds the name of the current page being viewed, we want to run our code only on edit.php (posts list) global $pagenow; //If the ‘Editor’ is logged in, exclude ‘Admin’s posts if(current_user_can(‘editor’) && (‘edit.php’ == $pagenow)) { //global $query’s set() method for … Read more
you should check out the other posts related to this. A lot of times you will have some type of malware in WordPress coded in PHP which screws with your JS codes. I have seen other threads on stack about similar points.. JavaScript widgets do not move and no ajax edits. Check out this stack … Read more
Yes, that’s safe. I have done that. The core does not rely on the existence of such a user. There might be some broken plugins whose authors think user 1 is always there and an admin, they will not work properly. On the other hand, this is a very simple test for a plugin: If … Read more
Important: You shouldn’t modify core files, because you might loose all your edits in the next core upgrade. You should instead enqueue your own stylesheet with your custom CSS modifications through the admin_enqueue_scripts hook or use a hook like admin_head to implement your customization. Here’s an example: /** * Force #wpbody to the ‘ltr’ direction: … Read more
Check the constant DOING_AJAX. It is always defined when someone uses the WordPress AJAX API. if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) return; if ( is_admin() ) add_action( ‘admin_init’, ‘xcsn_redirect_from_admin’ );
You can generate page views count without any plugins. What you need to do is create a post meta key for each post (of course automatically) and increase the counter of this post meta key on each post/page load or visit. So here is the function to create a post meta key post_views_count for each … Read more
According to the documentation for add_menu_page: Note: If you’re running into the “You do not have sufficient permissions to access this page” error, then you’ve hooked too early. The hook you should use is admin_menu. This means you need to wrap your menu creation in something like: add_action( ‘admin_menu’, function() { add_menu_page( // page title … Read more
WordPress doesn’t have built-in features for a site that is served in multiple languages. Yes WordPress has features for translating the UI labels into different languages, but not for the actual content. You are going to need to use a plugin that basically keeps multiple versions of each Post for each language and has means … Read more
The solution is simple. Add the word num when defining the column like this: // Add users table header columns add_filter( ‘manage_users_columns’, ‘gtp_users_table_columns’ ); function gtp_users_table_columns( $defaults ) { $defaults[‘purchased-leads num’] = __( ‘Purchased leads’, ‘gtp_translate’ ); return $defaults; } // Add users table lead purchase column content add_action( ‘manage_users_custom_column’, ‘gtp_users_table_content’, 10, 3 ); function … Read more