• Resolved Joelle

    (@joelle)


    Hello again! So, I recently took over a site that utilized CPT UI (which I was thrilled about), but that site has been handed off a few times now and for SOME reason, the CPT (in this case ‘books’) url string is doing some of this business: ?books=title-of-the-book

    I’ve gone through the CPT settings and checked, everything seems good, but it’s entirely possible I’m missing something. I’ve googled, of course, but nothing is bringing up what I’m looking for specifically, I’ve cleared the cache, I’ve rebuilt the permalinks, I’ve done the hokey pokey and turned myself around.

    Thoughts? 🙂 Thank you!

    Edit: I forgot to add that the rest of the site is functioning normally, it’s only on CPTs.

    • This topic was modified 5 years, 3 months ago by Joelle.

    The page I need help with: [log in to see the link]

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

    (@tw2113)

    The BenchPresser

    Hmm, looks like it’s not being recognized as a post type at all.

    Looking at the view source, and the <body> tag is showing this:

    <body class=”home page-template page-template-homepage-page page-template-homepage-page-php page page-id-659 wp-embed-responsive header-full-width full-width-content wpb-js-composer js-comp-ver-5.6 vc_responsive” itemscope itemtype=”https://schema.org/WebPage”&gt;

    That’s telling me, at the moment at least, that it’s just showing the homepage content.

    Can you paste in the settings for your CPTUI usage on this site? Curious what those may be and what may stand out.

    Thank you for the kind words at the start as well, and the excitement shown. We’re glad to hear people don’t run in fear when they inherit sits using our plugin 😀

    Thread Starter Joelle

    (@joelle)

    Never! I love you guys. 🙂 I’ll send that over in the morning. It’s so WEIRD, I’ve not seen this happen before, but I inherited this set up I’m looking forward to fixing it for the client, who has been frustrated with it for years now. 😲

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Whenever you’re ready 😀 we’re around.

    Thread Starter Joelle

    (@joelle)

    Pssst. I just sent you a login to check things out, if you like.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Confirmed.

    Looking things over, the posts on that page are set to be the structure you linked in your original posting above, in the “Books” page, however, the urls that are actually returning your post type content look more like ?post_type=books&p=###

    Regarding why on both parts, I have to wager it’s because you have “rewrite” set to false for your post type, thus why it’s looking the way it does. Enabling rewrites and flushing permalinks would allow for urls that look like /books/my-book-title/

    If that’s what you’d like, then I’d take those first steps regarding setting “rewrite” to true, flush the permalinks by visiting that settings page, don’t even need to click anything. Then update the links used for your “Books” page to match what the final URLs are ending up being.

    Thread Starter Joelle

    (@joelle)

    Ah! I thought I’d tried changing that, but clearly not! 🙂 I’ll give that a go. Thank you!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    looks like things are doing better overall. I am seeing a case of “books” menu item at the top now leading to the post type archive. I would have to double check to confirm, but my bets are that you have the page with a post slug of “books” on top of the CPT slug, so there’s going to be a conflict there. Specifically around what to query for.

    May need to tweak the rewrite slug for the book so that they don’t match exactly. Perhaps singular “book” would work.

    Glad to see some progress forward though 😀

    Thread Starter Joelle

    (@joelle)

    Oh yes, I meant to follow up – that worked perfectly. I’m kind of surprised two other devs that worked on this didn’t catch that, but then I am surprised *I* didn’t notice that since I work with CPT UI all the time. Sometimes you just need more eyes, I guess. What can you do? 🙂

    THANK YOU!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome, and what can you do? Just say supercalifragilisticexpialidocious, of course.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘CPT Single URL includes Query?’ is closed to new replies.