Best Way to Redirect Category to Page and Hide Category

I don’t know for some reason, the add_filter caused error. I used the following one: function my_page_template_redirect() { if ( is_category( ‘news-articles’ ) ) { $url = site_url( ‘/news’ ); wp_safe_redirect( $url, 301 ); exit(); } } add_action( ‘template_redirect’, ‘my_page_template_redirect’ );

How to create a custom sort for WordPress categories

If you’re already using Advanced Custom Fields (which you should be!) you can create an order field for your categories from which you can set them manually in numerical order. Then all you have to do is: $categories = get_categories( $args ); usort($categories, function($a, $b) { return get_field(“category_order”, “category_”.$a->term_id) – get_field(“category_order”, “category_”.$b->term_id); }); foreach ($categories … Read more

WP 3.9 TinyMCE no longer loads on category description editor

I was having the same issue and the problem was actually coming from the way the js was dynamically generating tinyMCE. Prior to v.4, it was: tinymce.EditorManager.execCommand(‘mceAddControl’, true, id); With 4, you need to use: tinymce.EditorManager.execCommand(‘mceAddEditor’, true, id); Have a look at wherever your function ‘wp_tiny_mce’ is – might be in there.

Using wp_category_checklist in a widget

The problem is that to make the update method of widget class work, the name inputs on the form method should be set via $this->get_get_field_name(‘name_of_the_field’); but wp_category_checklist has no argument to setup the name of the inputs (checkboxes). However, wp_category_checklist uses a walker class to print the checkboxes and allow customizing it. By default the … Read more