Post by ginboomerang » Sun Nov 29, 2015 8:33 am

How to add H1 Tag to Home Page - Opencart 2

Anybody know how and is it worth the effort ?

Thanks

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by jimmyphong » Mon Nov 30, 2015 5:19 am

open file (opencart 2.x)

catalog\view\theme\default\template\common\home.tpl

add <h1>You content here</h1> after <div class="container">

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by ginboomerang » Mon Nov 30, 2015 6:31 am

Thank you for your reply, much appreciated

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by ginboomerang » Mon Nov 30, 2015 9:30 am

I've now added the H1 Tag, the font is too large it looks bad on my homepage, how do I now reduce the font size?

Thanks

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by labeshops » Mon Nov 30, 2015 9:55 am

edit the h1 settings in your stylesheet.css or use an inline style to change only the one you added to your homepage.

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by ginboomerang » Tue Dec 01, 2015 2:04 am

Hello labeshops, thanks for reply. I'm sorry I don't understand, I think I'm looking for the code to reduce the font size ?

Thanks

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by labeshops » Tue Dec 01, 2015 4:05 am

Which is controlled in your stylesheet.

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by ginboomerang » Tue Dec 01, 2015 5:06 am

Thanks again for reply labeshop.

I've roped in my teenage son to help this duffer out, he's added some code and it's done what I've wanted, also centred it on homepage and spaced it better, would you kindly look and comment and assure me I've not pressured him into messing things up ? !

<?php echo $header; ?>
<div id="container" class="container j-container">
<h1 style="margin-top: 16px; margin-left: 18px; font-size: 18px;" align="center">MY TEXT</h1>
<div class="row"><?php echo $column_left; ?><?php echo $column_right; ?>

New member

Posts

Joined
Sun Aug 28, 2011 2:51 pm

Post by labeshops » Tue Dec 01, 2015 7:21 am

Looks fine and is what I meant by changing it inline :) Kudos to your son.

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by panagos » Tue Jan 19, 2016 11:25 pm

In future, if you need to change the style definitions, you can very easily use the browser inspectors (Inspect element in firefox and chrome) and then select the specific text element. The browsers will then point you to the actual defined CSS in the relevant stylesheet (including the line numbers within the CSS), which will then allow you to customise.

The editors also actually allow you to change these definitions on the fly to come up with the best CSS values.

--
Soteri Panagou
Freelance Developer and Opencart Zealot

http://www.opencart.com/index.php?route ... @gmail.com


New member

Posts

Joined
Sun Oct 25, 2015 3:01 am


Post by eluk_shop » Thu Jun 24, 2021 8:30 pm

jimmyphong.. thx man
jimmyphong wrote:
Mon Nov 30, 2015 5:19 am
open file (opencart 2.x)

catalog\view\theme\default\template\common\home.tpl

add <h1>You content here</h1> after <div class="container">
https://www.opencart.com/index.php?rout ... load_id=63
ELUKSHOP
Step 1:, copy in public public_html file step1_install_h1.php
step 2.-Open via browser domain.com/step1_install_h1.php
step 3 for Versiunea 3.0.3.7, instal step2_seo-tag-h1_for-OC-3.x.ocmod.zip from for-seo-tag-h1_v1.3-pack-3.x- Is super ok thx man for extension.

Newbie

Posts

Joined
Sun Jan 03, 2021 2:03 am
Who is online

Users browsing this forum: Bing [Bot] and 81 guests