get_permalink wrongfully returns only year and month and not all the link
get_permalink wrongfully returns only year and month and not all the link
get_permalink wrongfully returns only year and month and not all the link
It appears from your post that somehow the rewrite rules in your .htaccess file were lost/reset/corrupted. As long as your register_post_type() code remains unchanges, you can visit “Settings > Permalinks” to reset them and fix your issue.
try registering with a different name; doesn’t always make sense, but it’s a proper check. if that doesn’t resolve – which would be strange since the other CPTs work – check any functions/plugins hooking into template_redirect. might even need to do a backtrace to see the file load progression. not sure if it does this … Read more
Go to the permalinks setting in the wordpress settings page and change the permalink structure to this. https://mysite.com/%category%/%postname%/ And now add this code in your .htaccess file to achieve that permalink structure. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
Newly published content gives 404 on wordpress
Permalink structure depending on custom field
Slugs should be unique for each content type as they are a unique identifier of the content on the url side. To overcome this limitation you can simply create two costume taxonomies one for wheels and one for brakes and have a mercedes in both of them.
With some help I was able to get it working with this: add_action(‘init’, ‘journal_urls’); function journal_urls() { add_rewrite_rule( ‘^journal/([^/]*)$’, ‘index.php?name=$matches[1]’, ‘top’ ); } Maybe someone can benefit from this in the future.
Is there a way to change the complete URL of the blog post for a redirecting tracking link?
Pretty permalinks to work for lighttpd webserver?