Wordpress: Consistent URLs and breadcrumb on post page - wordpress

I'm working on a magzine page on a WordPress site. I want to get consitent URLs and breadcrumbs (Yoast) for SEO requirements.
I selected the magazin page, which I created under Pages, as the posts page in Settings -> Reading and now got the following URL for the magazine:
www.example.com/magazine/
In Settings -> Permalinks I got the following settings:
Individual structure: /magazine/%category%/%postname%/
and
for Category-Basis I put in magazine
In Yoast I selected to keep the category base.
Now I got the correct post URLs like I wanted:
http://example/magazine/category/this-is-my-post-slug/
But now there is the problem, that all posts are returning a 404 error. Another problem is, that the Yoast breadcrumb is not including the post page. So when I'm on a category it's in my example only Start | Category but should be Start | Magazine | Category
The other way around, when I remove magazine from the individual structure in permalinks, the posts dont have the right URL with /magazine/ in it. Also the breadcrumb doesen't include the "Magazine" page.
I would appreceate any help and hints to fix the issue.
Thanks in advance!

Related

Add Posts page slug to Single Post permalink structure

Does anyone know if it's possible to place WordPress Blog POSTS in a unique directory?
In other words:
mywebsite.com/blog/Post-A/
mywebsite.com/blog/Post-B/
mywebsite.com/blog/Post-C/
I'd like to create /blog/ which I believe is done by creating a PAGE but that doesn't seem possible.
I've googled this for the last few hours and still can't figure it out.
The only way you're probably going to be able to do this without a plugin is by utilizing Categories and a custom permalinks structure.
Navigate to Posts > Categories
Add a new Category
Apply the Category to the desired posts
Navigate to Settings > Permalinks
Select Custom Structure and apply the following structure: /%category%/%postname%/
There are also plugins that expand endpoints and routing. https://wordpress.org/plugins/custom-permalinks/
If your goal is to not have the posts on the front page, you can also set the Blog page to a specific page in Wordpress.
Create two new Pages (not to be confused with a post)
Navigate to Settings > Reading
Set Front page displays to A Static Page
Select the Pages to be displayed for the Front page and the Posts page
The Blogroll (Posts page) will then appear under the endpoint of the defined Page's slug. However, the individual posts permalink will not have the Blogroll Page's slug in the route.

Permalinks WordPress Woocommerce

I'm stuck with this permalink structure in WordPress, I like to have some advice from the experts in the WordPress permalink area.
I'm building a website / shop with WordPress and Woocommerce. Both the latest versions.
If a leave the permalink structure default for the website and the shop all works fine.
But the default WordPress pages will have the link structure as:
http://www.myshop.com/?page_id=25
If I change the structure to /%postname%/ the website itself works great with page links like:
http://www.myshop.com/myinformationpage
But..
The Woocommerce part however is completely broken. The products page is ok with the overview of the first shop page but every product selection will end up in a 404 error.
This is also for category's, tags en even the shop cart payment pages.
What is the way to go here?
The best way for SEO is to change the basic permalink site setting to one of the none standaard settings. But what must be done to keep the WooCommerce shop working?
I don't want to remove the /shop/ or /products/ from the WooCommerce URL.
My settings:
Common Settings: /%postname%/
Optional: Product category base: ?product_cat= and Product tag base: ?product_tag=
Product permalink base: Custom base: /?product=
After a lot of trying i came up with the setting above. This will work for all WordPress content pages and most of the WooCommerce pages but the return after payment page is still broken.
Any input is welcome here.... thanks in advance!
After trying and changing the permalinks over and over again, removing the .htaccess and save the permalinks setting again, and all other tips ....
I finally found a post on wordpress.org. On the problem that the confirmation page that wat not found. (404)
[https://wordpress.org/support/topic/order-confirmation-page-not-found]
Adding this code to function.php did the trick.
function flush_rules(){
flush_rewrite_rules();
}
add_action('init','flush_rules');
Thanks helgatheviking for your responce!

Assign a parent page to all WordPress posts

I am building the actual Website as well as the blog into a single WordPress theme. I've got everything setup, there is a blog page (www.mysite.com/blog/) which is set as the "Posts Page" and all the posts are displayed on this page as excerpts.
However, each post has the following URL: www.mysite.com/post1/, I need all post to have the blog page as their parent, so that their URLs will change to: www.mysite.com/blog/post1/.
How can this be done?
Thanks in advance
Willem
You can do this easily by changing your permalink structure. Just include /blog/ at the start of your custom structure.
It seems to only affect posts and not pages, which is what you want.

Wordpress Tags Error/Issue

I am using wordpress - and there is a way to publish pages and posts.
I am creating Posts and for that you can add tags (which just give you more keywords to rank for it shows up at the bottom of the posts - wordpress creates pages with these tags and it ranks for the tags in the search engines)
I created all these links inside the posts - and now after checking the
links they are fine on the main post page but for all the tags which come with that posts - the actual links get screwed up by wordpress bc they add a /tag/ before
the link.
This is the URL which gets created thats comes with the posts.
Example :-http://www.sitename.com/tag/tagname/
Please help
Verify if you have in the used theme the tag.php file, if not, then use one, for reference check the one from "Twentyeleven" WordPress template. (http://codex.wordpress.org/Tag_Templates)
In your dashboard, Settings > Permalinks, set to "Default", then save, then check "Post name" and save it again.
Good luck! :)

Mixing pages and categories in menu - permalink problems

I have/want the structure:
News
NewsPage | AnotherNewsPage | NewsCategory1 | NewsCategory2
NewsPost1 etc
Permalinks should be /news/newspage (works), /news/newscategory1 (doesn't work / permalink collision), news/newscategory1/newspost1 etc/
I currently have it so that News is a standard page as opposed to the Posts Page.
If this possible? Or do I have to accept that the permalinks for posts will always be different from the page permalinks / not mix pages and posts?
The permalink of the post will always be different - unless you start using custom post types and taxonomies.
You can change the root of the category path in the permalink settings - this will change the path for all posts though.
You could also start messing with rewrite rules but this could break everything else.

Resources