• Resolved needtakehave

    (@needtakehave)


    Once I change over the post from a regular post to a custom post type the post becomes not found.

    “Sorry, we can’t seem to find what you’re looking for.”

    When I go to look at it after I update or publish it, whichever.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Permalinks been flushed? Matching slugs from other posts? What’s the URL?

    Thread Starter needtakehave

    (@needtakehave)

    I figured it out — it was a conflicting plugin that I was using to try to get rid of the post type slug.

    But I do have a problem.

    I can’t seem to get the post type info to show up. Usually I am able to use the “get_post_meta” query to pull up info in my post templates from custom mets boxes, however, from the custom post types I created with the plugin, the info isn’t showing up. It’s just returning blank/empty.

    https://www.booksbytheton.xyz/reviews/magically-awesome/

    It’s only returning the post id, but not the actual info (the release_month, release_day, release_year, all of which has actually been entered.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I would recommend passing the 3rd parameter of boolean true to your get_post_meta calls. Looks like it may be returning arrays instead of single values.

    echo get_post_meta(237, 'release_month', true);
    
    Thread Starter needtakehave

    (@needtakehave)

    Hmm, just tried that and they are still returning arrays. I had them with trues originally and took them out to see if that fixed the problem. They worked before I installed the plugin, returned the correct info I mean, so I think it has to do with the plugin which is why I’m asking you — in case you’re wondering. Just not sure if there is some kind of conflict.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    No part of CPTUI would affect post meta like this, honestly. We avoid touching saved content values, so something else must have changed with regards to how meta data is saved.

    Not sure what all you did to convert the posts from the ‘post’ post type to a CPTUI-registered post type. If you’re getting an array back with the 3rd parameter being boolean true, then you’re going to need to do a foreach loop on the value instead of trying to echo it out directly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post Not Found’ is closed to new replies.