Pages redirected to attachment post

THE SETUP I’m using WordPress 3.4.2 with Magic Fields 2 plugin. Using MagicFields2, I’ve added a custom field to the builtin ‘page’ post type. This field is called ‘section_header’ (which is basically just an attachment post type). My permalink structure is /%category%/%postname%/. THE PROBLEM Sometimes, when I try to view a page with a ‘section_header’ … Read more

Is there a ‘rake routes’ for wordpress?

Is there an equivalent to ‘rake routes’ in php/wordpress that would spit out all the available wordpress url paths available? 1 Answer 1 var_dump( $GLOBALS[‘wp_rewrite’] ); this is as close as you’ll get. Anyway, there’re plugins like the “MonkeyMan Rewrite Analyzer” and toschos T5 Rewrite plugins that will allow you other nice things too.

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I used something like this: page.php?post_id=55. How is WordPress and other sites (I think StackExchange sites do this too) doing this? 1 … Read more

add_rewrite_rule not registering on Multisite

I have a multisite install of WordPress. I have installed the plugin Monkeyman Rewrite Analyzer so I can see all the rules I have registered. The code below is how I am registering the rule: add_action( ‘init’, ‘add_init_rules’ ); function add_init_rules() { add_rewrite_rule(‘^car/([^/]*)/([^/]*)/?’,’index.php?pagename=car&id=$matches[1]&make=$matches[2]’,’top’); } The rule I have added does not appear in the Monkeyman … Read more

CPT posts listed by category with custom rewrite URL, please help!

Here is what I’m trying to do: I have 10 total dessert recipes (in shared dessert category) that are divided by 2 custom post types. I want to create 3 different views of these posts with the custom URL structure described below: Recipes 1-3 (CPT “a”) with URL: “home/%posttype%/%category%/” Recipes 4-10 (CPT “b”) with URL: … Read more

custom taxonomy and custom post type url conflict

i am having one serious url issue. there is news custom post type. it’s slug is news. News taxonomy slug: news_category News taxonomy url is: http://domain.com/news_category/press-release i want to change the url of the news_category to news news . so url of news taxonomy would be: http://domain.com/news/press-release i tried to rewrite the slug news_category to … Read more