New answers tagged

0

In general it is possible to symlink wp_includes but not wp-admin. The main difference is that various places in admin want to know the path and they calculate it relative to the file which was first invoke to handle the admin request. The problem is that for symlinks PHP returns the path to the actual file and not its virtual path, making it impossible to ...


2

If you change manage_edit-post_columns to manage_posts_columns in your code snippet, then it should hide the comment column for all post types (appart from the page post type) within the WP_Posts_List_Table src. You might want to check if the column array key isset first, before unsetting it.


2

I got an alternative : This will not just hiding but disabling also function disable_comments() { $post_types = get_post_types(); foreach ($post_types as $post_type) { if(post_type_supports($post_type,'comments')) { remove_post_type_support($post_type,'comments'); remove_post_type_support($post_type,'trackbacks'); ...


0

add_filter( 'bulk_actions-edit-weddings', 'remove_from_bulk_actions' ); function remove_from_bulk_actions( $actions ){ unset( $actions[ 'edit' ] ); return $actions; } Change "weddings" with the custom post name, if no custom post just use "post".


2

Here's one demo suggestion: add_action( 'admin_enqueue_scripts', function() { wp_enqueue_script( 'my-script', '/my-script.js', ['underscore', 'backbone'], '1.0' ); wp_add_inline_script( 'my-script', 'alert("hello world");' ); // Add our template if( function_exists( 'wpse_add_inline_tmpl' ) ) wpse_add_inline_tmpl( $handle =...


0

Well looks like the solution was I logged out of the admin / my account. I then went to another browser which I have not used to log into the website with before and logged in and now the admin/toolbar appears when browsing the website. Little bit embarrassing to how long I spend on this, one of those moments. Anyway hope it may help someone else.


-1

Add this in the CSS: * { box-sizing: content-box; }


1

First of all I am a careful (maybe paranoid) guy. I tried to login into a Wordpress account few days ago and didnĀ“t noticed it was the "Admin" login. I even notice that I can login via Twitch ... but that was too late! If it's not your account you should notify them! If you can get in who else might be in there doing bad things? Back to my story. If I ...


0

Here's what I did: Inserted ob_start() and ob_get_clean(), at strategic places in header.php and footer.php within a child theme derived from my base site's main theme. <some header stuff> ob_start() <header html I want to reuse across network> <?php $html = ob_get_clean(); echo $html; harvest_html($html, 'header'); ?> The function ...


0

Finally I used the wp_set_password(); function as the emergency reset script documentation of Wordpress explains, which helped me to set a new password for my admin account.


0

based on https://wordpress.org/support/topic/wp-admin-returning-500-errors-after-update-to-421, seems like it was related to the conversions of tables to utf8mb format done in 4.2 which timeout when there are many comment. Possible solutions: make the DB upgrade on some staging server in which all timeouts are off, or increase the timeout on the production ...


0

I would even go as far as setting up .htaccess to rewrite the request to https for a specific folder, aka /wp-admin/ For example RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} wp-admin RewriteRule ^(.*)$ https://www.yourdomain.com/wp-admin/$1 [R,L] Also it looks like FORCE_SSL_LOGIN was depreciated since 4.0, so in your ...


0

The function is_admin() is available before any plugin is loaded. So you can use it when you are registering the callback: is_admin() or add_filter('acf/load_value', 'word_swap' );


2

You need the !is_admin() check. This will return false on admin pages, failing your condition. On front end pages, that condition will return true, executing your conditional statement if ( !is_admin() ) { // Do something only on frontend }


0

Putting aside the objections to order by taxonomy, eloquently given by @Otto in http://wordpress.stackexchange.com/a/14309/25886, I suppose his answer has merit. His reference to http://scribu.net/wordpress/sortable-taxonomy-columns.html in particular, with a post on sortable taxonomy columns. The folllowing code is by @mikeschinkel: function ...



Top 50 recent answers are included