However, I notice that when I go to settings/permalinks and change
FROM: Custom Structure, https://mysite.com/%category%/%postname%/
TO: Plain, https://mysite.com/?p=123
instead of my custom 404 template, it displays a file not found from 404.shtml in the public_html directory.
This behavior is repeatable because when I revert back to the custom structure, it returns to the customized 404 template.
How does changing the permalink setting as described determines which 404 file is executed?
Ronald Cross
]]>You can still access: example.com/category/news-999/company.
The alias of the top-level category, “news,” can be changed to any letter and still be accessible, for example:
Even with incorrect parent category aliases, it is still accessible. Why does this happen? This should be unreasonable, right?
]]>can I use whatever permalink structure I want if I use yoast or do you reccomend one permalink structure in particular? And why? Now the structure of my permalink is mywebsite.com/%category%/%postname%/ and I am planning to change it to mywebsite.com/isola-di-govinda/%postname%/
Best regards
]]>I have a website that includes normal pages, blog posts, and a store. I want to change the permalink structure only to the blog posts. The blog post has to be mywebsite.com/isola-di-govinda/%postname%. How to do it with no plugin?
For the other pages, the structure has to be mywebsite.com/%postname%/ (it can be changed inside the dashboard, I know). For normal page is currently mywebsite.com/%category%/%postname%/
I am looking forward to hearing from you.
Best regards
]]>I initially discovered this issue while rewriting and redirecting video media attachment pages within the ‘/video/’ structure. The findings are as follows:
Here is the code snippet that demonstrates the issue:
add_filter('attachment_link', function($link, $post_id) {
$post = get_post($post_id);
if ($post->post_type == 'attachment') {
$mime = get_post_mime_type($post_id);
if (strpos($mime, 'video') !== false) {
$link = home_url('/video/' . $post->post_name . '/');
} elseif (strpos($mime, 'image') !== false) {
$link = home_url('/image/' . $post->post_name . '/');
}
}
return $link;
}, 10, 2);
Further testing revealed that simply setting the permalink structure (from the WordPress menu, for all posts) to ‘/video/%postname%/’ halts all AMP conversions.
I am currently using Version 2.5.4, the latest available version.
]]>