EC CUBEでのSEO対策「タイトル変更」

EC CUBEでのSEO対策

EC CUBEをインストールしデフォルトの状態ですとTOPページのタイトル表示が「サイト名/TOPページ」となっており、商品一覧や詳細ページでは「○○○/商品一覧ページ」「○○○/商品詳細ページ」となっていますので、今回はこの「○○○/」を取る方法をご紹介いたします。

商品詳細や一覧のタイトル

/data/Smarty/templates/default/site_frame.tpl を開き

<title><!–{$arrSiteInfo.shop_name}–>/<!–{$tpl_title|escape}–></title>

<title><!–{$tpl_title|escape}–></title>

に変更します。これで商品詳細や一覧のタイトルにサイト名が入らなくなります。

サイト名/TOPページ

次にdata/class/pages/LC_Page_Index.phpを開き

function init() { parent::init(); $this->tpl_mainpage = ‘top.tpl’; $this->tpl_column_num = 3; }

の部分に$this->tpl_title = ‘タイトル’;を付け足し

function init() { parent::init(); $this->tpl_mainpage = ‘top.tpl’; $this->tpl_column_num = 3;     $this->tpl_title = ‘タイトル’; }

に変更し保存します。これで「サイト名/TOPページ」と表示されなくなります。 非常に簡単ですので是非ご活用下さい。

お問い合わせ