Custom Fields
Re-Envisioned
Support MB Custom Post Type Permalink issue with Custom Post Type

  • Creator
    Topic
  • #22770
    Resolved Ghislain Malardier
    Participant

    Hi, 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:

    Please let me know if I missed anything.
    Thanks

Viewing 10 replies - 1 through 10 (of 11 total)
  • Author
    Replies
  • #22782
    Long Nguyen
    Moderator

    Hi,

    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?

    #22792
    Ghislain Malardier
    Participant

    Hi,
    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%/.

    #22796
    Long Nguyen
    Moderator

    Hi,

    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.

    #22799
    Ghislain Malardier
    Participant

    Hi, The issue still persist.

    Please see the video: loom.com/share/a960023c62d14db9aac82a44573e567c

    Thank you

    #22820
    Long Nguyen
    Moderator

    Hi,

    Please share your admin site account via this contact form https://metabox.io/contact/. I will check this issue.

    #27317
    Angelika
    Participant

    Hi, 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".

    #27734
    Cat Burchmore
    Participant

    I am having the same issue, how can this be resolved please?

    #28157
    Shrini
    Participant

    change premalink to plain
    test
    now you can change the premalink to postname
    works
    for every new item creation I am doing this
    please fix it

    #28787
    Margaret Blauvelt
    Participant

    I 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.

    #28794
    Long 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.

Viewing 10 replies - 1 through 10 (of 11 total)
  • You must be logged in to reply to this topic.