Using arbitrary paths in page urls
Using arbitrary paths in page urls
Using arbitrary paths in page urls
How to make permalink structure %category%/%postname%/ work for custom post type?
This question is difficult to understand but I think what you want is to run flush_rewrite_rules() on theme activation. I don’t believe there is a specialized hook for this but both @Rarst and @toscho have posted good methods in another answer. You should be able to easily adapt that code.
When you register a post type, WordPress creates a query var for that post type which it uses in the process of parsing incoming requests and converting them into queries. In your case the query var is event: register_post_type( ‘event’, $args ); Your form then uses a POST var of the same name: $event = … Read more
A link to a page including an anchor doesn’t go to that anchor – URL gets changed
According to the WP codex it doesn’t look like there is a %page% tag. See the codex for a list of structure tags. The codex states You must use one of the structure tags, or a combination of tags only. That might be the issue. http://codex.wordpress.org/Using_Permalinks#Using_.22Pretty.22_permalinks OR Since the codex states Make sure to end … Read more
Pretty URLs and custom post types
Make use of the get_comment_link function in your foreach loop like so: foreach ($comments as $comment) { $output .= ‘<li><strong>’ . $comment->comment_author . ‘ said</strong> : “‘ . ‘<a href=”‘ . get_comment_link( $comment->comment_post_ID ) . ‘”>’ . strip_tags($comment->com_excerpt) . ‘…”</a></li>’; }
You need to create a hook for wpmu_new_blog action: add_action( ‘wpmu_new_blog’, ‘wpse8170_wpmu_new_blog’ ); function wpse8170_wpmu_new_blog( $blog_id ) { switch_to_blog( $blog_id ); flush_rewrite_rules(); restore_current_blog(); }
The slug blog is reserved for the main/root site of a wp multisite setup. In short, I do not recommend trying to use it for something else – it only produces trouble. The slug is hardcoded in some places, so you would have to do some hacky fixes to get around that. Which isn’t a … Read more