Tag Info

New answers tagged

1

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' );


0

I was unable to solve this myself but I finally found a plugin to achieve this, not sure how I missed it in the Wordpress plugin repository. https://wordpress.org/plugins/force-first-last/


1

This will add a new column to the Users admin and show their last login. <?php /* Plugin Name: (#158276) WPSE | Last user login */ // Add user meta `last_login` that saves the UNIX time stamp // to identify the exact time when a user logged in add_action( 'wp_login', 'add_login_time' ); function add_login_time( $user_login ) { global $wpdb; ...


1

There are several plugins to accomplish this. Like https://wordpress.org/plugins/wp-better-emails/ or http://wordpress.org/plugins/wp-email-template/


0

If you need to modify the publish date for hundreds of posts then your best bet without a plugin or homemade solution is through a MySQL query.


0

Make sure you have the appropriate character set in your wp-config.php file. utf8 is a safe bet. define('DB_CHARSET', 'utf8');


0

If the front-end of the website is still working correctly then it will likely be that your PHP memory is being exhausted due to either too many plugins and/or some plugins using too much of your PHP resources. The links in this thread should be your next port of call: http://wordpress.org/support/topic/after-log-in-screen-goes-blank


0

After manual update, plugins are deactivated by default. It's like installing a new plugin all over again.


6

Changing admin columns belongs to a plugin, not to a theme file, because themes should never change anything else than frontend output. You can get the complete plugin here: Plugin Product Editor Column. Looking at the docs you linked to, I see the plugin author requires a child class that mixes multiple separate tasks. That’s not good. We will see in a ...


1

In your finctions.php add_filter( 'auto_core_update_send_email', '__return_false' );


0

The HTTP headers are already sent when you are inside your redirect_to_local_110() function, so you risk the : Warning: Cannot modify header information - headers already sent by ... message. You can try and verify it within your function: function redirect_to_local_110() { if( headers_sent() ) { echo 'oh, headers are already sent, ...


0

The $location parameter was incorrect. Try this: function redirect_to_local_110(){ wp_redirect( home_url() ); exit; } function add_home_link() { add_menu_page( 'Course', 'Course', 'read', 'home', 'redirect_to_local_110', 'dashicons-welcome-learn-more'); } add_action( 'admin_menu', 'add_home_link', 1001 ); Or you could use this: function ...


0

if ( !function_exists( 'wp_toolbar_frontend_admin_menu_links_extras' ) ) { function wp_toolbar_frontend_admin_menu_links_extras($wp_admin_bar) { if ( is_admin() || !is_admin_bar_showing() ) return; if ( !current_user_can('edit_pages') ) return; $wp_admin_bar->add_node(array( 'id' => 'homepage', ...


0

Sometimes i find wordpress can be quite finiky when it comes to referencing files within the plugin. Specifying a full path seems to fix the problem. Try replacing... market_admin/icon.png With... /wp-content/plugins/your-plugin-name-goes-here/your-file-name-goes-here.png


0

To dynamically add menu items you can use WP_Query, specifically get_posts or get_pages. Get pages is more consistent. Here's an example to add all pages to the Pages admin menu. You can change paramaters to exclude, include, orderby, etc in the $args below. To change to a custom post type just change $custom variable to your post type name. ...


3

First, like many things in WordPress, it's not like someone decided "let's make this neat and convenient". It was more like someone slapped it together for something, then it got used more in admin, then it got used a lot in admin, then it became kind of practice to use it for non-admin as well. Or something along these lines. Second, it's not as much what ...


-2

Ok.. so this is the solution, We need to include the file called pluggable.php correctly like this: EDIT: if(!is_admin()) { // Make sure it is not in the admin panel require_once('wp-includes/pluggable.php'); if(current_user_can('manage_options')) { // do stuff here } }


1

Apparently the function is not defined at the point of calling your code ..so wrap the code of yours in to a function and hook it to the init.


0

Another method is to insert this script into ADMIN HEAD to add anything to TinyMce: http://stackoverflow.com/a/24907894/2165415


0

Post categories are managed by the sub-menu item under "Post" on your site's admin menu. Once logged in to the WP admin, goto Posts > Categories.



Top 50 recent answers are included