Bulk Change WordPress category Slug
wpkf_terms do not contain field called cat_name. Try using below query. update wpkf_terms set name=CONCAT(name, ‘-subbed’) Where term_id IN (SELECT term_id from wpkf_term_taxonomy where taxonomy=’category’)
wpkf_terms do not contain field called cat_name. Try using below query. update wpkf_terms set name=CONCAT(name, ‘-subbed’) Where term_id IN (SELECT term_id from wpkf_term_taxonomy where taxonomy=’category’)
For changing the category from Tumblr to another one for that you need to create another caregory at <pre> Posts -> Categories -> Add New </pre> first and than filter categories by Tumblr And than all Tumblr category’s Posts disaplay and do QUICK EDIT for changing the categories.
the_posts_pagination works with the global $wp_query, so your second method will not work. query_posts modifies the main query but the arguments passed will overwrite any existing values, so all values needed for pagination are lost when you set cat=5. But you can preserve the existing values by modifying the global query string. A more efficient … Read more
There is a hook that can be used for any taxonomy, create_{$taxonomy}, which in your case, is a category. So, it would be create_category: add_action( ‘create_category’, ‘my_function’, 10, 1 ); This is triggered by wp_insert_term() at line 2142.
You can use this code if you want to add an image in a specific category or a post. You can manipulate this code as you wish: add_filter( ‘the_content’, ‘add_a_image_in_post’ ); function add_a_image_in_post($content){ global $post; if($post->post_type == ‘post’){ //error_log(print_r($post, true), 3, WP_CONTENT_DIR.’/debug.log’); $all_cats = get_the_category($post); foreach($all_cats as $cat){ if($cat->slug == ‘sticky’){ return $content.”<img src=#1 >”; … Read more
Confused about category.php template – not working
add_filter( ‘get_terms_args’, ‘wpse_53094_sort_get_terms_args’, 10, 2 ); function wpse_53094_sort_get_terms_args( $args, $taxonomies ) { global $pagenow; if( !is_admin() || (‘post.php’ != $pagenow && ‘post-new.php’ != $pagenow) ) return $args; $args[‘orderby’] = ‘slug’; $args[‘order’] = ‘DESC’; return $args; }
You can change the code in the theme files to do this. Open the file category.php (if this file doesn’t exist, try archive.php) and replace the text you want to change with single_cat_title() Here is the documentation However these changes will be overwritten if you update your theme You can create a child theme or … Read more
When you register your post type, in your options array, set ‘rewrite’ => array( ‘with_front’ => false ), this will remove the “blog” from the front. Remember to flush your permalinks after you make this change. Not sure about categories being programmed through wordpress (it COULD be possible) but you could do a rewrite rule … Read more
Go to Appearance -> Menus and manage your menu there. You should be able to choose what will appear in the menu.