Why doesn’t ‘continue’ work in page?

get_the_terms returns an array of terms – so $terms is an array. Therefore, your condition: if( $terms->slug != ‘product-gallery’ ) will always return false, and therefore skip every post every time. Try if ( in_array( ‘product-gallery’, $terms ) ) continue; The above is untested.

How to remove the category from post slug

As @E pointed out, this is handled in Permalink Settings. To access these settings, look in the Admin menu on the left side of your screen. Under ‘Settings’ click on ‘Permalinks’ In ‘Permalinks’ you can see all of your various options for how to format the permalinks. It sounds like you want to use the … Read more

Can’t remove slug in url

After doing some research I found following code, made it a plugin (you have to create a php file and give it a name,copy code below into that file and place it in your plugins folder). It is not my code so therefore I put references to the author and original source-code and links to … Read more

Wrong slug on blog page

This code is used after <head> and before <body> and is supposed to get current page’s slug. It works great, however it will get the slug of first blog post when on “general” blog page. $post is going to be set to the first post in the Loop when the page loads. On “page” pages … Read more

Auto update post title and slug when post status is changed

I think I found the solution: add_filter(‘wp_insert_post_data’,’reset_post_date’,99,2); function reset_post_date($data,$postarr) { //update post time on status change $data[‘post_date’] = $data[‘post_modified’]; $data[‘post_date_gmt’] = $data[‘post_modified_gmt’]; //also update title and add the current date to title $data[‘post_title’] = ‘Your Default Title – ‘. current_time ( ‘m-d-Y’ ); //also update the slug of the post for the URL $data[‘post_name’] = … Read more

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