SimplePortal
Support => English Support => Topic started by: Snoopix on April 20, 2014, 01:17:13 AM
-
Hi guys,
How can i set a meta description to homepage?
Google displays the first part of the last article, but i want a fixed description
on index.template (current theme):
<meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
thx!
-
I use an SMF mod for meta tags - have a look over there in Modifications. I think there are 2 or 3 at least.
-
thanks but i don't want install mods
i installed a mod time ago (optimus brave), but had problems with link tree
i just want to change metadescription to homepage (portal), because google displays the first part of last article, the same when i copy url on facebook status ... so really isn't descriptive
(sorry for my english)
-
some mods are better than others.
If you did not like optimus brave, you might want to test out one of the others.
If you don't want to use a mod, then you will be stuck doing essentially the same customizations -- and doing it by hand.
* You will make changes to index.template.php, in function template_html_above.
* You will add whatever meta tag you want to add
* You will need to do this for whatever theme is used by robots -- this will be the same theme that guests see.
* If you want a different meta tag for the portal page, you will have to put in some logic to detect the portal page (and check if simpleportal is installed and enabled). I can help with this. If you are interested, just let me know.
-
Hi again, i installed MetaTags Modification (http://custom.simplemachines.org/mods/index.php?mod=1871) and don't works.
Google has been updated description for some sections, e.g.:
?action=register
?action=login
?articles=4, ?articles=16 etc...
but has not been updated for main site: mydomain.net , which displays the first part of last added article
-
Please have a look at the HTML for your site.
I can see (from http://custom.simplemachines.org/mods/index.php?action=parse;mod=1871;attach=213962;smf_version=2.0.2) that it makes a change in index.template.php that will add several meta tags to every page, as long as they have been set up.