Have 1.1.03
Now I loathe to ask this, but I cannot find it, want to add meta title tags to the contact us and advanced search pages, at the moment they are picking up just the website name, so creating dups, not the end of the world, but I cannot find where to edit them, I have a very bad feeling its going to be easy, but a gentle nudge would be nice.
Regards
David
Meta title contactus & advanced search
-
BatteryTrader
- Contributor
- Posts: 153
- Joined: Thu Apr 11, 2024 7:18 am
- Phoenix Version: 1.1.0.3
- Has thanked: 3 times
- Been thanked: 17 times
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Meta title contactus & advanced search
https://github.com/CE-PhoenixCart/Phoen ... on.php#L65
That sets the title.
https://github.com/CE-PhoenixCart/Phoen ... hp#L23-L28
That adds the product SEO title to the meta title.
You could add something likeby hook. E.g. hook_shop_contact_us_title->listen_injectRedirects
In the language file, you'd need something likeor skip the hook and just put something like in the language file. I think that either way should work.
Code: Select all
Guarantor::ensure_global('Template')->set_title(TITLE);https://github.com/CE-PhoenixCart/Phoen ... hp#L23-L28
Code: Select all
$GLOBALS['Template']->set_title(
((MODULE_HEADER_TAGS_PRODUCT_TITLE_SEO_TITLE_OVERRIDE === 'True') && ( !Text::is_empty($product->get('seo_title')))
? $product->get('seo_title')
: $product->get('name'))
. MODULE_HEADER_TAGS_PRODUCT_SEO_SEPARATOR
. $GLOBALS['Template']->get_title());You could add something like
Code: Select all
Guarantor::ensure_global('Template')->set_title(CONTACT_US_TITLE . $GLOBALS['Template']->get_title());In the language file, you'd need something like
Code: Select all
const CONTACT_US_TITLE = 'Contact Us | ';Code: Select all
Guarantor::ensure_global('Template')->set_title('Contact Us | ' . $GLOBALS['Template']->get_title());-
BatteryTrader
- Contributor
- Posts: 153
- Joined: Thu Apr 11, 2024 7:18 am
- Phoenix Version: 1.1.0.3
- Has thanked: 3 times
- Been thanked: 17 times
Re: Meta title contactus & advanced search
Thank you, works fine, easy when you know how.
Regards
David.
Regards
David.
- burt
- Core Team
- Posts: 4546
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Meta title contactus & advanced search
I have not tried recently, but you should be able to just add (to the contact_us language file)
const META_SEO_TITLE = 'Contact Us';
const META_SEO_DESCRIPTION = 'An easy for to allow you to contact us';
And similar to the advanced_search langue file
const META_SEO_TITLE = 'Search Our Site';
const META_SEO_DESCRIPTION = 'Blah blah blah';
const META_SEO_TITLE = 'Contact Us';
const META_SEO_DESCRIPTION = 'An easy for to allow you to contact us';
And similar to the advanced_search langue file
const META_SEO_TITLE = 'Search Our Site';
const META_SEO_DESCRIPTION = 'Blah blah blah';
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Meta title contactus & advanced search
I thought there was something more, but I apparently looked right past it.
That would also require includes/modules/header_tags/ht_pages_seo.php to be turned on.
That would also require includes/modules/header_tags/ht_pages_seo.php to be turned on.