Falang needs /blog/ to permalinks to show any post
-
I have set permalinks with custom structure like: %category%/%postname%.
I can visit all pages of the site but get an error when i visit any post.
To solve the error i had to add /blog/ to permalinks custom structure like: /blog/%category%/%postname%/
Is there a way to visit posts without entering the /blog/ to permalinks?
-
Hi, it’s not normal, can you put screen capture of
- Permalink configuration
- Setting/General tab
What is this blog list ? a page ?
Stéphane
It’s a page with a list of posts from a specific category (i use Query Loop block). When i click the button “read more” from a post, it opens the post with the word error and not with the post content.
How is set this page ? it’s a block editor page ?
you send me the screen capture of the falang settings not the settings / general
if you can put your user in english i don’t read the language , it’s seem russian
can you show this blog page to reproduce the settings on my local server to see what’s wrong , my category blog page don’t have this problem
The page is a block editor page and it’s set up using a pattern which brings posts from a specific category. I send you a print screen from the edit environment in case i helps you. I also send you the settings/general print screen.
ok and can you post here the view code of this block page, to put it directly locally, i don’t use the block editor, i don’t like it.
The idee is to reproduce locally the problem to find a fix.
The view code of the page is:
<!-- wp:group {"align":"full","style":{"border":{"radius":"3px"},"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"backgroundColor":"white","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-white-background-color has-background" style="border-radius:3px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:query {"queryId":10,"query":{"perPage":"10","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{"category":[124]}},"align":"full","className":"content-radius is-style-alternate-position"} -->
<div class="wp-block-query alignfull content-radius is-style-alternate-position"><!-- wp:post-template {"layout":{"type":"default"}} -->
<!-- wp:columns {"verticalAlignment":"center","align":"wide","style":{"spacing":{"blockGap":{"top":"0","left":"0"},"margin":{"top":"0","bottom":"0"}},"border":{"bottom":{"color":"var:preset|color|light-gray","width":"1px"}}}} -->
<div class="wp-block-columns alignwide are-vertically-aligned-center" style="border-bottom-color:var(--wp--preset--color--light-gray);border-bottom-width:1px;margin-top:0;margin-bottom:0"><!-- wp:column {"verticalAlignment":"center","width":"100%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:100%"><!-- wp:group {"style":{"spacing":{"padding":{"top":"36px","right":"36px","bottom":"36px","left":"36px"},"blockGap":"var:preset|spacing|50"}},"layout":{"type":"constrained","justifyContent":"left","contentSize":"100%"}} -->
<div class="wp-block-group" style="padding-top:36px;padding-right:36px;padding-bottom:36px;padding-left:36px"><!-- wp:post-title {"textAlign":"left","isLink":true,"style":{"typography":{"letterSpacing":"2px"},"spacing":{"margin":{"top":"2px","right":"0","bottom":"0","left":"0"}}},"fontSize":"medium"} /-->
<!-- wp:post-excerpt {"moreText":"","showMoreOnNewLine":false,"excerptLength":35,"style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"normal"} /-->
<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group"><!-- wp:read-more {"content":"ΠΕΡΙΣΣΟΤΕΡΑ →","className":"wp-block-button__link"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:post-template -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"24px","right":"24px","bottom":"24px","left":"24px"},"blockGap":"0","margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px"><!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->
<!-- wp:query-pagination-numbers /-->
<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:group --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->I would also like to add that if i put the %postname% first in permalink and the %category% second like: /%postname%/%category%/ then the post is shown, but the link has the postname first followed by the category name, thing that i don’t want. Hope this helps.
I have finished confire my site like yours
i have a page BlogSupport with your code inside, i have make a menu item with this page linked the url locally is
https://localhost/gutenberg/blogsupport/
https://snipboard.io/c43wFq.jpg
front-end default language i have this
https://snipboard.io/URy3u0.jpg
the link for readmore (in russian)
https://localhost/gutenberg/uncategorized/gutenberg-simple-block/
for the translation page in french, the first link is
https://localhost/gutenberg/fr/uncategorized/le-block-simple-gutenberg/
Stéphane
Hello again and a Happy new Year.
The problem insists and i have probably found why:
The slug name of the page that contains the list with the articles (filtered by a specific category) is the same with the slug name of the category that is assigned to the articles.
And generally, if the slug name of a category is the same with the slug name of any page then i will get an error when permalink of articles has the custom structure: /%category%/%postname%/.Is there a way to bypass the above issue; I have tested the above with a clean installation of wordpress and i have the same behavior.
Hi,
You create a page with the slug ‘myblog’ , in this page you have a list of articles => how is make this article list ?
this article are from the category ‘myblog’
but you say “?if the slug name of a category is the same with the slug name of any page then i will get an error when permalink of articles has the custom structure: /%category%/%postname%/.“
i have try with the woodmart default template and data, i have a fashion categorie , i have create a fashion page with the same slug and add a menu item
[Site]/categorieus/fashion/
[Site]fashion/
work with %postanme% but not with /%category%/%postname%/.” You are right
i will look what’s wrong
Stéphane
Hello,
I also noticed that if the permalinks are set to: /%category%/%postname%/ and i use a relative link inside a page (like: ./name_of_page/), in order to visit another page of the site then i will get again a Page Not Found error. Can you check that too?i will check this too
- You must be logged in to reply to this topic.