set new link as permalink

I would think something is wrong here: $meta = get_post_meta( $post->ID, $extlink , TRUE ); This is the function: get_post_meta( int $post_id, string $key = ”, bool $single = false ) You are setting the $extlink as the $key parameter, but it is really a meta key? From your explanation, it seems to be a … Read more

Issues with WordPress permalinks

This is a typical issue when moving WordPress sites. WordPress stores URLs – both main configuration URLs and resource URLs – in the database. These must be changed in the database when moving to a new domain or mail URL in localhost. Don’t use simple SQL change queries in the database via adminer or phpmyadmin. … Read more

Folder Name and Category Name WordPress

Option 1 This is the clean way using .htaccess. Put this at the top of your .htaccess: <IfModule mod_alias.c> RedirectMatch 301 /portal/wp-content/uploads/(.*) /wp-content/uploads/$1 </IfModule> Option 2 This is a bit brute-force and I therefore wouldn’t recommend it, but I include it here for completeness. Just copy all files in website/portal/wp-content/uploads to website/wp-content/uploads/ manually

Custom Permalinks and filters?

Maybe in the custom_rewrite function, try concatenating $wp_rewrite->rules and $feed_rules using array_merge, then returning $wp_rewrite. function custom_rewrite( $wp_rewrite ) { $feed_rules = array( ‘local/(.*?)/(.*?)/?$’ => ‘index.php?page_id=41&trade=” . $wp_rewrite->preg_index(1).”&area=” . $wp_rewrite->preg_index(2), “local/(.*?)/(.*?)?$’ => ‘index.php?page_id=41&trade=” . $wp_rewrite->preg_index(1).”&area=” . $wp_rewrite->preg_index(2), ); $wp_rewrite->rules = array_merge($feed_rules, $wp_rewrite->rules); return $wp_rewrite; } I haven”t tested that at all, just a suggestion of … Read more

Permalink, links a page to the homepage

Can you go to Settings/Permalinks and click Save Changes. That will flush the permalinks. You could look at the ‘Debug wp_redirect‘ plugin. Edit: Another idea is to determine what template file is in use. I have a small function plugin that adds debug comments to the header and footer for logged in Editors or Admins. … Read more