Removing the number in a category slug

You probably have a tag with the same slug. You can’t have any taxonomies with duplicate slugs. Either delete that other taxonomy, rename/change its slug, or change/rename this category. EDIT Ok, it turns out you can do this, if you don’t mind programming the fix or directly executing the SQL or messing with PHPMyAdmin. What … Read more

Custom post type’s slug gets wrong when adding a custom meta box

This strange behaviour is very likely to be caused by the additional form tag you’re adding. The meta boxes are already encapsulated by a form, so adding one yourself in the meta box callback is unnecessary. Removing <form action=”<?php bloginfo(‘url’); ?>” method=”get”> and </form> should solve your issues. EDIT: Seeing as this didn’t solve your … Read more

Remove taxonomy slug when not assigning taxonomy with custom post types

The post_type_link filter is responsible for modifying the permalinks that are output, but it’s not connected to resolving incoming requests for those permalinks. So you’ll need to modify your function to output the correct links, but also add a rewrite rule so WordPress knows what to do when those pages are requested. This is all … Read more

How to update all post at once?

Try this out: /* Plugin Name: Post Bulk Update Description: Updates certain fields of my posts at once. On Activation. Awesome Author: Me. I did it */ add_action(‘init’,’post_bulk_update’); function post_bulk_update(){ $posts_to_update = new WP_Query(‘cat=x&showposts=1000’); while($posts_to_update ->have_posts()) : $posts_to_update ->the_post(); $postUpdateArray = array(); $postUpdateArray [‘ID’] = $post->ID;//Don’t remove this. The ID is mandatory $postUpdateArray [‘post_title’] = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)