New answers tagged

0

This can also happen if WordPress is hosted behind a reverse proxy that provides SSL. Paste the following in your theme's functions.php: define('FORCE_SSL_ADMIN', true); // a comma-separated list e.g. http,https if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';


0

Edit your wp-config.php file and add the following: define( 'WP_MEMORY_LIMIT', '96M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' ); Depending on your server setup this may work, but if not you'll need to contact your host.


0

is this a localhost install of wordpress? i had this problem with a localhost install, and it ended up being read/write permission issues between my /var/html/ folder and WP itself, and then it was read/write issues with the database :/ after working on it for a long time, i finally gave up and followed a different tutorial for installing LAMP/WP in one ...


0

There are many reasons why WP could display this: 1 Insufficient file permissions on wp-admin folder (check this with ftp) 2 Prefix not consistently the same in database and wp-config (less likely in this case, but check anyway). 3 .htaccess doesn't reroute wp-admin folder correctly 4 User roles not well defined in database (wp_capabilities should ...


0

1. You can use pre_get_comments hook: add_action('pre_get_comments', function($query) { global $pagenow; if ( is_admin() && ('your-custom-page' === $pagenow) ) { $query->query_vars['meta_query'] = [ 'relation' => 'AND', [ 'key' => 'key1', 'value' => 'meta1' ...


1

Please check this link: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP I hope your issue will resolve.


1

add this line to your wp-config.php file: define('WP_MEMORY_LIMIT', '64M'); OR If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)


0

I just added the id (#login h1 a) to the function and that worked fine. function my_login_logo() { ?> <style type="text/css"> #login h1 a, .login h1 a { background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/login-logo_320px.png); padding-bottom: 30px;background-size:160px ...


0

Make sure you set your define( 'WP_DEBUG', false ); Else you may get 404. In my case I had that problem, when I inherited some project where there was many notices, and PHP warnings. This may be connected with the Ajax problem I had at that time. The temporary solution was to set debugging to false in my case.


0

I see two options here - override the CSS, or remove the "active" classes with JavaScript (sadly there is no action/filter that we can do this server-side) - I opted for the JS approach, it's cleaner, leaner and meaner: function wpse_227037_remove_menu_classes() { echo '<script>jQuery( ".wp-has-current-submenu.wp-menu-open" ).removeClass( ...


2

No, it is not possible to create third level menu in admin panel. If you look at the definition of add_submenu_page, you need to mention the parent slug name. For eg: add_menu_page ( 'Test Menu', 'Test Menu', 'read', 'testmainmenu', '', '' ); add_submenu_page ( 'testmainmenu', 'Test Menu', 'Child1', 'read', 'child1', ''); The first parameter of the ...


0

Assuming you are using a hierarchical taxonomy this worked for me, change 'tx' to whatever you called your taxonomy. Note, if WP change their HTML structure in the future or naming conventions this may not work. add_action('admin_footer', function() { ?> <script type="text/javascript"> jQuery(document).ready(function ($) { //taxonomy ...


1

If you want to rename the wp-admin with the aim of adding additional layer of security to your WordPress installation, you can also try the Roots / Bedrock WordPress Boilerplate. It can help isolate the web root to limit access to non-web files. It can also help in organizing/securing the whole WordPress core by putting it in its own subdirectory like ...


0

pre_get_users is the action that is fired before a user query is run. You need to check the context of the action to make sure you're on the main users screen. You can then alter the query with any parameters accepted by WP_User_Query. A quick example: function wpd_filter_users( $query ) { $screen = get_current_screen(); if( is_admin() && ...


1

My choice would be to use WP_List_Table. If you continue reading the Codex it makes it clear that it is commonly used by third party code. "Someday" it might go away, but I doubt it will happen abruptly (if at all). If it does change, there will probably be a newer solution to replace it. EDIT: Another thought. if you feel really can't use WP_List_Table ...


1

Why not extend WP_List_Table? It creates responsive tables that collapse to an accordion when the table width exceeds the screen size. See Class Reference/WP List Table. You might take a look at the code in this plugin to get started: Custom List Table Example


-1

You can make tables responsive using CSS. I recommend applying a class to the , and referencing that class in CSS code setting dimensions to percentages. ...Something like will respond very well to .respond {width:100%; height: 100%}. If you want the responsiveness to be really awesome, you can address different devices explicitly in CSS using media ...


1

Yeeey, I figured it out! Actually my theme had a redirect like this one in functions.php: // Block Access to /wp-admin for non admins. function custom_blockusers_init() { if ( is_user_logged_in() && is_admin() && !current_user_can( 'administrator' ) ) { wp_redirect( home_url() ); exit; } } add_action( 'init', ...



Top 50 recent answers are included