Get slug to point to different content of the same post

Based on the new details in the question: Instead of creating a separate “type2” post type, you could: Put all the data together in the “type1” post Have the “type2” permalink (example.com/taxonomy/type1/type2/) redirect to: example.com/taxonomy/type1/?type=type2 (you can make this query string whatever you want, but the gist is, redirect to a query string version of … Read more

Display page over category archive

Option #1 Add a theme file for each category, instead of adding a Page for each category. You would create a file called category-news.php which would only display for the news category at /news/, plus files for each other category, such as category-other.php which would display for the other category at /other/. Then just place … Read more

Problem with single-page for my custom post

Your code looks sound, so you should have a look at the code in your single.php template, as I suspect that there is something wrong in that template to why nothing is displayed. You should set debug to true in wp-config.php. This should help you locate your problem Secondly, your single-posttype.php is wrongly named. Your … Read more

Get menu item slug

Well you’ve Post ID with you. So you can use this custom function to retrieve slug of any post. function get_the_slug( $id=null ){ if( empty($id) ): global $post; if( empty($post) ) return ”; // No global $post var available. $id = $post->ID; endif; $slug = basename( get_permalink($id) ); return $slug; } This in return will … Read more

Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)

The single_tag_title() function returns the tag title while you need the tag slug or ID for use in query_posts(). This should get you started: if ( is_tag() ) { $tag = get_queried_object(); $tag_title = $tag->name; // Same as single_tag_title() $tag_slug = $tag->slug; $tag_id = $tag->term_id; } http://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters

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