Custom Post Type slug same as page name causing a conflict

What is appearing at http://www.example.org/team-members/ is the ‘post type archive’ for your post type. It’s the automatically generated list of posts created by WordPress. If you don’t want the post type to have an archive you can disable the archive by setting the has_archive argument to false: register_post_type( ‘post_type_name’, array( ‘has_archive’ => false, ) ); … Read more

How to get “extended” path info from URL in a plugin

In reply to “Update 1“: The code worked fine for me. So, I’m still getting a 404 when I go to “mypage” with anything following the pagename, like so: http://example.com/mypage/foo. Because your RegEx pattern is ^category/([^/]+)/?, so the URL you should have visited is http://example.com/category/foo. But then, you shouldn’t use category because that “base” is … Read more

Allow single quote in URLs

WordPress will strip off special characters, since they can cause issues when writing to the database. It’s best practice to avoid using special (reserved) characters in URLs, as they can and will break when passing them around. Case in point, see your own post and the cutting off of the URL after the ‘.

Sorting Posts Via Custom Taxonomy Values Using Checkboxes?

Wrap the whole thing within a form and add a submit button in it: <form method=”POST” action=””> <ul class=”filter-sub-dropdown”> … </form> Use term IDs as checkbox values instead of slugs (you’ll save a little server resources): $discipline->slug; > $discipline->term_id Then, in your functions.php file check if that form has been submitted, and change WP’s query … Read more

Access $_POST data after redirect

Redirects are GET requests usually, and the browser doesn’t send the POST data for those. That’s not something WordPress can change. You could create a session, or – better – process the POST data first, then redirect. In your plugin, you could do: add_action( ‘plugins_loaded’, ‘process_post_data’, 0 ); function process_post_data() { // Read raw POST … Read more