Tag Info

New answers tagged

0

I used: function hide_yoastseo() { if ( !current_user_can( 'administrator' ) ) : remove_action('admin_bar_menu', 'wpseo_admin_bar_menu',95); remove_menu_page('wpseo_dashboard'); endif; } add_action( 'admin_init', 'hide_yoastseo'); ... but then the media library in grid view did not load and I could not add a featured image. Then I changed ...


0

I have changed the do_action() for a apply_filter(). This worked as follows: // Filter save settings $settings = apply_filters( 'gtp_theme_settings_tab_save', $settings, $tab, $_POST ); $updated = update_option( 'gtp_theme_settings', $settings ); And then my add_filter in plugin file looks like: function ac_theme_settings_tab_save( $settings, $tab, ...


0

From what I understand from your question, your best course of action is to assign the node to a Wordpress callback function using built-in AJAX. If you don't know what I'm talking about, you should familiarize yourself with using AJAX in Wordpress in the Codex. However, here is a basic overview of steps: Add a function in a JS file that is attaches a ...


0

If you're refering to WP internal forms: Wordpress has an built in security mechanism called "wp nonces" (https://codex.wordpress.org/WordPress_Nonces) - that's an unique hash generated for every WP-form. Every Backend code should check for the according nonce to make sure that The form submission wasn't done from outside (usually attacks or bots) The ...


1

Almost exactly the same to brasofilo, my code below also accounts for different taxonomies and removes the checkbox for parent categories at the top level, only if they have children. This allows for other top level categories that are childless to still be selectable. I put this simple code my theme's functions.php file: class Category_Checklist { ...


0

Yes there is!! If you hover over a page and click "Quick Edit" you will see a box that says "Order", set this to 0, then on the page you want to display next set it to 1. Then on the page you want to display third set it to 2.....etc


2

If you want to test your custom SQL to see how it affects the loading time, you can try this query swapping: /** * Restrict the potential slow query in the meta_form() to the current post ID. * * @see http://wordpress.stackexchange.com/a/187712/26350 */ add_action( 'add_meta_boxes_post', function( $post ) { add_filter( 'query', function( $sql ) ...


1

I think this is a bad case of taxonomy split introduced in WP 4.2 ref. https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/ Solution for this would be to use this plugin to detect and fix the splitting before Updating menus which is a bit buggy in my opinion. Update nav menus will trigger ...


0

Removing the metaboxes also prevents the slow query. function remove_metaboxes() { remove_meta_box( 'postcustom', 'page', 'normal' ); } add_action('admin_menu', 'remove_metaboxes');


0

It could be a plugin. Try renaming the plugin folder (inside wp-content) to pluginx and try accessing the admin panel. Renaming the plugin folder will make all your plugins reset and automatically turn off. Then try turning each plugin back on one by one.


0

I found a solution after looking for several threads and official forums: If you created your wp-config.php file using the Wordpress automatic install then it is most likely that your wp-config.php has an unclosed <?php tag, close to line 80 - 81. After that fix, everything in MAMP and XAMPP was working fine. I don't know if it is a Wordpress ...


1

The text you are referring to is located in here: wp-admin/nav-menus.php. But we will not edit directly. We will use functions.php for the convenience of preserving the changes after an upgrade. Use the following code in functions.php add_filter( 'gettext', 'wps_translate_words_array' ); add_filter( 'ngettext', 'wps_translate_words_array' ); function ...



Top 50 recent answers are included