The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.



Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Fri Dec 24, 2010 8:26 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 19, 2010 2:47 pm
Posts: 19
I wonder if anyone knows if it's any simple modifications I can do to make my site code article titles in <h1> instead of <h2>? Now my template automatically displays article titles as <h2>, but for Google-reasons, I would like this to be <h1>.

I know I should ask the template provider, and I've posted the question in their forum also, but hasn't received any answer.


Last edited by Babelfish44 on Sat Dec 25, 2010 12:05 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:06 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Jun 26, 2010 9:15 pm
Posts: 615
Location: Charlotte, NC, USA | Köln, NRW, DE
Most templates already place the article title as H1 - before changing anything I would use Firebug or just do F+12 in your browser and locate the article title and see if it is already H1.
If for some odd reason it isn't. that shouldn't be too hard to change in the template CSS

Hope that helps!

_________________
Respectfully,
Jon Neubauer
Tweet at me @219jondn


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:13 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 19, 2010 2:47 pm
Posts: 19
I chekced with Firebug, and the article title is coded as <h2> - that's why I want to change it :) Any tips for what to look for in the CSS file?


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:21 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Nov 09, 2006 2:46 pm
Posts: 4874
Location: Kampala, Uganda
It could be hard coded as <h2> in the template html override in the php itself.

look in /templates/template-name/html/com_content/ ...

_________________
John Muehleisen
Visit my "Getting Started with Joomla" site, now with videos, tips, and new user tutorials:  http://welcometojoomla.com


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 19, 2010 2:47 pm
Posts: 19
This is the reference for <h2> I find in /com_content/default.php:

<h2 class="contentheading<?php echo $this->escape($this->params->get( 'pageclass_sfx' )); ?> clearfix">

<?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
<span>
<a href="<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get( 'pageclass_sfx' )); ?>"><?php echo $this->escape(isset($this->article->page_title)?$this->article->page_title:$this->article->title); ?></a>
</span>
<?php else : ?>
<span><?php echo $this->escape(isset($this->article->page_title)?$this->article->page_title:$this->article->title); ?></span>
<?php endif; ?>
</h2>

I guess I've found the code line? Should I just try to move it into the <h1> tag?


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:37 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Nov 09, 2006 2:46 pm
Posts: 4874
Location: Kampala, Uganda
Quote:
Should I just try to move it into the <h1> tag?

Yes

_________________
John Muehleisen
Visit my "Getting Started with Joomla" site, now with videos, tips, and new user tutorials:  http://welcometojoomla.com


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 10:55 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 19, 2010 2:47 pm
Posts: 19
The whole code between <h2> and </h2>? And the code under <h1> into <h2>?

Sorry for beeing a noob, but I've only used Joomla! for three days :)


Top
 Profile  
 
PostPosted: Fri Dec 24, 2010 11:01 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Nov 09, 2006 2:46 pm
Posts: 4874
Location: Kampala, Uganda
just change the <h2> to <h1> and the </h2> to </h1>

That should do it for you.

_________________
John Muehleisen
Visit my "Getting Started with Joomla" site, now with videos, tips, and new user tutorials:  http://welcometojoomla.com


Top
 Profile  
 
PostPosted: Sat Dec 25, 2010 12:04 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 19, 2010 2:47 pm
Posts: 19
jmuehleisen wrote:
just change the <h2> to <h1> and the </h2> to </h1>

That should do it for you.


Did that now, and it worked just fine, problem solved. Thanks for your help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 



Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group