Display my site's name in the meta title of every page
Permalink
I know there is such a way in wordpress, and I'm wondering if there's a way to display my site's name in the meta title of every page of the site.
For example, if a page's meta title is:
Nice Wedding Dresses
I want it to take my site name and place it in front
My Site Name - Nice Wedding Dresses
For example, if a page's meta title is:
Nice Wedding Dresses
I want it to take my site name and place it in front
My Site Name - Nice Wedding Dresses
Hi..
Changing the title and site name (getting meta to html) would be in your_root/concrete/elements/header_required.php file.
Copy that file to your_root/elements/ folder and edit there. The format to change would be after this line of code.
p/s: do be careful in editing the line of codes (and this particular file) due to the file required for all your web pages.
If for display in pages would be from slafche codes given above.
Changing the title and site name (getting meta to html) would be in your_root/concrete/elements/header_required.php file.
Copy that file to your_root/elements/ folder and edit there. The format to change would be after this line of code.
..code... <?php $akt = $c->getCollectionAttributeValue('meta_title'); ..more code..
p/s: do be careful in editing the line of codes (and this particular file) due to the file required for all your web pages.
If for display in pages would be from slafche codes given above.
I agree, you should do it this way. You also don't need to worry about an update erasing your work when you have a copy outside the concrete folder.
Magic heading can do that and a lot more to keep your meta title and description in line with site content.
http://www.concrete5.org/marketplace/addons/magic-heading/...
http://www.concrete5.org/marketplace/addons/magic-heading/...
Yeah.. almost forgot about the cool add on john, thks for reminding us..
<?php
$page = Page::getCurrentPage();
echo $page->getCollectionName()." - My site name";
?>