Category slug in in loop always the same?

First, Please don’t use query_posts.. Second, you’ve set $category somewhere in code not posted and never change it. How do you expect it to be different? What you need to do is retrieve the categories, which isn’t that hard… $cq = new WP_Query(‘category__in=4′); while ( $cq->have_posts() ) { $cq->the_post(); $c = wp_get_object_terms($post->ID,’category’); var_dump($c); // echo … Read more

How to Disable UNICODE slug?

My solution using 3 combined hooks wp_insert_post_data, wp_ajax_sample-permalink,name_save_pre //==================DISABLE GEORGIAN + Russian SLUGS for POSTS================ //disable slug on any update add_filter(‘wp_insert_post_data’, ‘myappend_slug’, 3); function myappend_slug($data) { $data[‘post_name’]= slug_modify($data[‘post_name’]);return $data; } add_action( ‘wp_ajax_sample-permalink’, ‘MyajaxSamplePermalink’,1); function MyajaxSamplePermalink($data) { // check that we’re dealing with a product, and editing the slug $post_id = isset($_POST[‘post_id’]) ? intval($_POST[‘post_id’]) : 0; … Read more

Can’t make permalink of CPT work

The rewrite value actually comes before your post slug, so you need to visit localhost/wp/realizzazioni/{{POST_SLUG}} to view the post. If your new post’s name is “Test” you should be able to view the post at localhost/wp/realizzazioni/test. Other tips: Make sure there isn’t a page already using the realizzazioni slug. Finally, flush your permalinks by going … Read more

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