Permalink issue with Custom Post Type
Support › MB Custom Post Type › Permalink issue with Custom Post TypeResolved
- This topic has 12 replies, 7 voices, and was last updated 3 years, 5 months ago by
Jonni.
-
AuthorPosts
-
November 10, 2020 at 7:38 AM #22770
Ghislain Malardier
ParticipantHi, I'm having an issue on Metabox Custom Post Type.
When using /%postname%/ for permalink, only pages create with the Custom post type are working. Normal WordPress pages redirect to an archive page!
If I use /%post_id%/ , all is working but it show the post name, not the post id.
Debug mode do not show any error and I don't see any JS error in console.
I made this quick video to show the issue and the CPT configuration:
https://www.loom.com/share/b6a6f54771c04317b57b649f53a4ec77Please let me know if I missed anything.
ThanksNovember 10, 2020 at 3:42 PM #22782Long Nguyen
ModeratorHi,
I do not see the issue when viewing your site, see my screen record https://share.getcloudapp.com/xQuA2qGk.
Can you please confirm it works?
November 11, 2020 at 12:03 AM #22792Ghislain Malardier
ParticipantHi,
It is only working if I use the /%post_id%/ (which it is set to right now), Plain (https://site.com/?p=123), or Numeric (https://site.com/archives/123).It is not working with any other WordPress default permalink structure. I'd like to use /%postname%/.
November 11, 2020 at 9:14 AM #22796Long Nguyen
ModeratorHi,
I'm not able to reproduce the issue on my end. Please try to deactivate all plugins except Meta Box and MB AIO, switch to the default theme of WordPress Twenty Twenty, change the content of the .htaccess file to basic https://wordpress.org/support/article/htaccess/ then check the issue again.
November 11, 2020 at 9:59 AM #22799Ghislain Malardier
ParticipantHi, The issue still persist.
Please see the video: loom.com/share/a960023c62d14db9aac82a44573e567c
Thank you
November 12, 2020 at 4:24 PM #22820Long Nguyen
ModeratorHi,
Please share your admin site account via this contact form https://metabox.io/contact/. I will check this issue.
April 16, 2021 at 3:38 PM #27317Angelika
ParticipantHi, did you solve this problem? I have exactly the same case and before you ask for it: I do never give admin site account access to anyone. If the problem is not solved I will open an own thread, I don't want to highjack this one here.
The problem with using %post_id% is on posts (not pages or cpt). On posts the URL has a number domain.com/123 <- I would like to see the postname. But if I choose %postname% posts-URLs are fine, but then cpt-pages show "This page does not exist".
April 28, 2021 at 7:30 PM #27734Cat Burchmore
ParticipantI am having the same issue, how can this be resolved please?
May 13, 2021 at 6:59 PM #28157Shrini
Participantchange premalink to plain
test
now you can change the premalink to postname
works
for every new item creation I am doing this
please fix itJune 9, 2021 at 1:49 PM #28787Margaret Blauvelt
ParticipantI am having the same issue (and I cannot understand what the last person posted - "plain test" or "plain text"? How do I do that?).
Anyway, I tried using a custom archive slug in the "Advanced" Meta Box menu for the custom post type and it made NO difference. My custom post type is named "mjb-post" and the slug I put in is "mjb". Rather than trying to find my post under "mydomain.com/mjb/my-title", the system still wanted to list the URL to the article as "mydomain.com/mjb-post/my-title". In either case, I could never bring up the article as a published article. (I could preview it fine.) Also, if I found it by searching, a nice excerpt was listed in the search results but when I clicked the title, I was taken to the "Not Found" page. If I tried typing directly in the URL, "mydomain.com/my-title", the system redirected it to "mydomain.com/mjb-post/my-title" and again the result was the "Not Found" page.
Another bit of trivia: When I found the excerpt by searching, I could click the "Edit" link below it (logged in as administrator) and I was correctly taken to the edit page for that post. So the system understands everything about the post except the pretty URL.
I tried disabling EVERY plugin except Meta Box and Meta Box AIO. No change.
I don't know if it makes a difference, but WordPress is installed in a subdomain. I tried switching the .htaccess file for one I used originally to run WordPress out of the subfolder. No difference. The newest version has no reference to the subdomain while the old, original version did, so I'm not sure why the new one works. If I remove the .htaccess file completely, the only page URL that works is the home page, which correctly shows the excerpts but when I click on any title link, I get not only a "Not Found" error, but also that error does not display on the WordPress "Not Found" page because WordPress cannot find the "Not Found" page.
June 9, 2021 at 4:59 PM #28794Long Nguyen
Moderator@margaretmendoclick-com you can use the option
Custom rewrite slug
to rewrite the post type slug and re-save the permalink settings in Admin Dashboard > Settings > Permalinks (Post name) to flush the permalink cache.June 16, 2021 at 1:36 PM #28929Margaret Blauvelt
ParticipantOK I get it. The goal is to get WordPress to save the permalink structure again. I changed the permalink structure and changed it back. I may or may not have had to save a new permalink structure before saving the original again. All is well. Thanks.
November 3, 2021 at 1:18 AM #31706Jonni
ParticipantThis worked for me on Oxygenbuilder 🙂
The templates didn't find custom posts, so after flushing the permlinks they did!
-
AuthorPosts
- You must be logged in to reply to this topic.