Change post permalink to external URL from custom field

Filter post_link (or post_type_link for custom post types), fetch and validate the post meta value, then return that instead of the original link. As a plugin: <?php /** * Plugin Name: External Permalinks * Plugin URI: http://wordpress.stackexchange.com/q/64285/73 * Description: Uses the value of post meta field <code>syndication_permalink</code> as permalink if available. * Version: 2012.11.13 * … Read more

Cross post type parent page added parent page to permalink but give 404

I think that you need only to change the way get_permalink create url for the cpt, ignoring the parent. You can do it adding a filter to ‘post_type_link’ hook and then regenerate the permalink for the product cpt in the same way is done in core, just ignoring the parent: add_filter(‘post_type_link’, ‘reset_light_link’, 999, 3); function … Read more

How to mix pages and sub-categories in a url

I don’t think so. Why not try something like this: A permalink structure like this: /%category%/%postname%/ Category: Windows Sub-Category: Serenity Create a post and assign it to “Serenity” (sub-category), and publish it. The post’s URL would now look just the way you want it to: http://site.com/windows/serenity/post-name/ and most importantly it should work the way you … Read more