Reply To: Show title tag instead of page name in search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Show title tag instead of page name in search results Reply To: Show title tag instead of page name in search results

#6166

Ernest Marcinko
Keymaster

Hi!

I've googled for like an hour or so, but I'm afraid it's not possible to get it.

The wordPress codex says that there is no internal function to get the title tag of a page by it's ID. Mainly becuase it's a theme tag and it uses global objects, and it get's it's value in the site header.

I've tried a few different possible solutions on my test environment, but nothing works. It looks so simple, but yet it's extremely complicated.

One thing we can try, is to generate the title tag without getting it.

If you can tell me how your title tags look like, I might be able to suggest something. What I mean is it's structure, like for example “{blog_title} | {post_title]”

The blog title is usually there, plus there is a separator and the post title. The order and the separator is usually different. I think you can check this structure in the SEO plugin configuration.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)