Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Adding CPT Slug to Result
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 4 months ago.
- AuthorPosts
- October 28, 2021 at 11:53 am #35379
Hey there,
I’m using Ajax Search Pro and I wonder if there’s a way to include CPT slugs.
For example, I have a CPT called cakes with /cakes slug.
Can I show that in a search result? e.g. Brownies – Cakes?
Cheers,
JulienOctober 28, 2021 at 11:59 am #35380Hi Julien,
Via the advanced title and content fields, you can print the post type name via the
__post_type
pseudo variable.In your case the advanced title field could be something like:
Best,
{titlefield}[ - {__post_type}]
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 28, 2021 at 12:05 pm #35381Thanks for the quick answer!
Is there a list with all variables that can be used?
October 28, 2021 at 12:10 pm #35382Sure! They are listed in the first paragraph of the documentation on the link in my previous answer: https://i.imgur.com/H5qHbjQ.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 29, 2021 at 9:26 am #35392Sorry, blind sometimes.
Anyways, do you plan on integrating GA4 event tracking anytime?
Plugin’s awesome so far.October 29, 2021 at 1:04 pm #35399Thank you very much!
Search event tracking is already integrated. It works on both GA4 and the older gtag and universal event trackers.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.