More than 800+ satisfied clients and counting, since 2010

Blog

Remove Joomla Meta Description Without Editing the Core

How to Remove Joomla Meta Description

Remove Joomla Meta DescriptionJoomla meta description is required because it forms a more compelling web page in search engines. More people will click on sites having a proper meta description in the search engine snippet than random descriptions. But if you wish you can remove the Joomla meta description completely. Edit the templates/mytemplate/ component.php /index.php file.

1. Complete Removal in Component.php file

<jdoc:include type="head" />

2. Individual Removal in Component.php file

  • Access head elements only: $document = $this->getHeadData();
  • Access path reference: $baseURL=JURI::base(true);
  • Access all scripts
foreach ($document[scripts] as $key=>$value){
if (stristr($key,$baseURL)==NULL){$url= $baseURL."/".$key ;}else{$url=$key;}
$scripts .= "<script type=".$value." src=".$url."></script>"; };
  • Access all style sheets
foreach ($document[styleSheets] as $key=>$value){
if (stristr($key,$baseURL)==NULL){$url= $baseURL."/".$key ;}else{$url=$key;}
$style .= "<link rel='stylesheet' type=".$value[mime]." href=".$url." />"; };
  • Access all internal scripts elements
foreach ($document[script] as $key=>$value){
 $scripts .= "<script type=".$key." >".$value."</script>"; }
  • Access all custom scripts
foreach ($document[custom] as $value){
$custom .= $value; }

3. Remove Joomla Meta Description Without Editing Component.php file

  • Create new tmpl file in template folder. Eg [installation path]/ template/ mytemplate/
  • Using plugins

Written by

The author didnt add any Information to his profile yet