New answers tagged

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 ...


0

For consistency, I'm assuming you'd prefer to use "Save" instead of "Publish" throughout Wordpress instead of just on the text of the button. Based on the solution provided by @Rarst, I expanded the code so it translates many (all?) other instances of the word "Publish" to the appropriate variation of "Save". add_filter("gettext", "...


0

get_post_permalink won't work for draft or pending posts. But there are a couple workarounds you could use. Here there is a similar post with two options.


0

I've solved this issue defining the right way wordpress search for the wp-content folder. In wp-config.php you can specify the position of the wp-content folder. Based on the system you are working on, try to set the following code: define('WP_CONTENT_DIR', realpath(dirname(__FILE__) . '/wp-content')); or this one: define('WP_CONTENT_DIR', realpath($...


1

After a little bit of trial and error, I finally got my code to work. This will redirect http://example.com/wp-admin/plugins to http://example.com/wp-admin/admin.php?page=pretty-plugins.php if the current user doesn't have access to update core. add_action( 'admin_menu', 'block_direct_plugin_page_access' ); function block_direct_plugin_page_access() { ...


0

A dev version clearly needs to be created. Resolving this will take time. You will need debug and the ability to experiment with disabling plugins. Chances are, the slowness is caused from a bad query with a plugin. Or too many scripts. Also, 100mb of memory is far inadequate for a site with that much traffic. For me, Id go minimum 500, depending on what ...


0

I had the same problem and I have found a solution : Call the same page with a parameter and include the content depending on the paramter : if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define(PLUG_NAME, "my_admin"); //hook to add an item in the menu admin add_action('admin_menu', 'my_admin_setup_menu'); function ...


0

FTP into your site and open up your wp-config.php file. Add this line: define('CONCATENATE_SCRIPTS', false); Make sure you add this before: /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/');


1

This removes the 'quick edit' button from the page edit dashboard for all users who cannot edit theme options (usually admins). So, quick edit is no longer available for common editors, assuming there has been no messing with default capabilities. The two added filters are the same. One of them is probably meant to apply to the post edit dashboard and ...


-1

The solution I read nowhere on the internet: tb_position is the thickbox function that do strange things with the window size. You can easily and simply overide it by the time thickbox call it. old_tb_position = tb_position; tb_position = function(){ $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px', ...


6

Here's a script that you can enqueue into your admin panel. It will add a new tab to the category tabs called "Active". Whenever a checkbox is checked, it gets added to the "Active" tab list, you can also click links in the "Active" tab list to remove them ( uncheck them ). Add this as an external script, custom-tabs.js maybe: jQuery( document ).ready( ...


0

The easiest way would be to add a meta box and use get_the_category_list to show the categories that already have been selected. This only works if you save your post, just like the tags are only shown in their own box after you confirmed them. If you want to do this on the fly, you will need javascript to fill your metabox. Put a selector on all checkboxes ...


0

Check if you or a plugin include bootstrap and the bootstrap CSS / Theme files. Bootstraps .hidden class looks like: .hidden { display: none !important; } But overrides wordpress' definition of .hidden: .hidden { display: none; } The Top 'Help' & 'Screen Options' bars are displayed via inline style display: block, which is overridden by ...


0

I've found the source of the problem, I have redeclared the function comment_footer_die(). Which wordpress obviously can't accept. My supplied code works as intended.


1

"Headers already sent" errors are frequently caused by plugin conflicts. Since you have access to phpMyAdmin, you could try emptying the active_plugins data from the options table. (But first I would copy and save the option_value elsewhere for resetting it if it doesn't help.)


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



Top 50 recent answers are included