keefoong
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeHi, I FINALLY solved it by adding some rewrite rules in my functions.php. Not sure whether this is the best way but at least I got what I want. Below is the rewrite rules that I added:
function add_rewrite_rules() { add_rewrite_rule( 'products/(.+?)/(.+?)/(.+?)$', 'index.php?products=$matches[3]&taxonomy=$matches[2]&types=$matches[1]&posttype=products', 'top' ); add_rewrite_rule( 'products/(.+?)/(.+?)$', 'index.php?products=$matches[2]]&types=$matches[1]&posttype=products', 'top' ); add_rewrite_rule( 'products/(.+?)/(.+?)$', 'index.php?types=$matches[2]&posttype=products', 'top' ); } add_action('init', 'add_rewrite_rules');And John I’m glad you had your problem solved. I tried for almost a week now.
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeDo you think a custom rewrite rules could be the answer? Or is it possible to change the query string?
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeI think there is some problem with the query string? types shouldn’t be there…
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeI had installed a plugin in Debug This, and I used it to see the request. And this the last part showed this:
[query_string] => types=5-watt-bulb&debug-this=request [request] => products/led/led-bulbs/5-watt-bulb [matched_rule] => products/(.+?)/?$ [matched_query] => types=led%2Fled-bulbs%2F5-watt-bulb [did_permalink] => 1Is the “2F” might be the caused of the problem?
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeI installed this plugin around tuesday if not mistaken. As I recall I never upgrade it. The version I’m using now is 1.0.8, so I guess it’s a fresh install?
By the way when I change the permalink settings to default,
http://www.example.com/?p=123, the post did show up.And I had installed Custom Post Type Permalinks plugin as well.
Another things, when I get the code and paste it on my
function.php, my whole site doesn’t show at all. Just keep loading.These are some extra information for you, maybe you can relate this to the problems? Appreciate so much on your work on this plugin. Thanks!
Forum: Plugins
In reply to: [Custom Post Type UI] 404 when viewing a post from custom post typeYa I did. Go to permalink settings and save changes right? Still doesn’t work for me.