-
AuthorPosts
-
June 7, 2011 at 9:43 pm #164957
Using joomla 1.6 and latest version of ja_t3_blank.
How can we set the article title to use the seo preferred h1 tag instead of the h2 tag.
Thanks.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
June 8, 2011 at 12:03 pm #395269you can change it in this File
componentscom_contentviewsarticletmpldefault.php
<?php if ($params->get('show_title')) : ?>
<h2>
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
Note: If you Find my Post useful please click on the Thanks Icon
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
June 10, 2011 at 3:15 am #395638Solution 1:
You create folders as follow:
ja_t3_bank/html/com_content/article/
And copy files from folder plugins/system/jat3/jat3/base-themes/default/html/com_content/article/
After that you can change code in ja_t3_bank/html/com_content/article/default.php
<?php if ($params->get('show_title')) : ?>
<span>chang tag h2</span><!-- just test -->
<h2>
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
NOTE: Clear ja_t3_cache before refresh front-end page.
Solution 2:
Create a theme in local/themes/<name theme>
Create folders localhost/themes/<name theme>/html/com_content/article
Copy files from folder plugins/system/jat3/jat3/base-themes/default/html/com_content/article/
And change code file default.php of localhost/themes/<name theme>/html/com_content/article folder.Access to your admin site
Edit template ja_t3_blank
In PROFILES tab at Theme settings session, you add new theme as attached image.
Save settings and refresh your front-end page.1 user says Thank You to chavan for this useful post
July 24, 2011 at 8:48 pm #402777Chavan,
So sorry as again, this does not entirely make sense to me. I see the file that you reference and in your instructions you say …
<blockquote>you can change it in this File</blockquote>
Honestly, what is “it” ?
Especially when a slight expansion of that file reveals both h1 and h2 are present as follows:
21 <?php if ($this->params->get(‘show_page_heading’, 1)) : ?>
22 <h1>
23 <?php echo $this->escape($this->params->get(‘page_heading’)); ?>
24 </h1>
25 <?php endif; ?>
26 <?php if ($params->get(‘show_title’)) : ?>
27 <h2>
28 <?php if ($params->get(‘link_titles’) && !empty($this->item->readmore_link)) : ?>
29 <a href=”<?php echo $this->item->readmore_link; ?>”>
30 <?php echo $this->escape($this->item->title); ?></a>
31 <?php else : ?>
32 <?php echo $this->escape($this->item->title); ?>
33 <?php endif; ?>
34 </h2>
35 <?php endif; ?>I mean, what values does one change to what other values ?
July 24, 2011 at 8:53 pm #402778As noted in my response to Chavan I am seeking additional guidance on which values to change to which other values. Simply pointing a layperson to a file and a section and saying that is where you change “it” is not helping. Especially when it appears there are other references to the same value “h1” that are not addressed in the instructions.
I do thank you in advance for your time and attention; especially since you do not ask for it in your every post.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 25, 2011 at 3:03 am #402799Hi
I have the answered the Question raised “How can we set the article title to use the seo preferred h1 tag instead of the h2 tag.”
So i have referred the file where you need to change the tags
Also if you need to do on other layouts of your site . Please post all the Urls.
July 26, 2011 at 10:31 pm #403202Chavan,
in this file …
/opt/lampp/htdocs/bweb/components/com_content/views/article/tmpl/default.php
… I changed the h2 on line 27 and 34 as you can see.
21 <?php if ($this->params->get(‘show_page_heading’, 1)) : ?>
22 <h1>
23 <?php echo $this->escape($this->params->get(‘page_heading’)); ?>
24 </h1>
25 <?php endif; ?>
26 <?php if ($params->get(‘show_title’)) : ?>
27 <h1>
28 <?php if ($params->get(‘link_titles’) && !empty($this->item->readmore_link)) : ?>
29 <a href=”<?php echo $this->item->readmore_link; ?>”>
30 <?php echo $this->escape($this->item->title); ?></a>
31 <?php else : ?>
32 <?php echo $this->escape($this->item->title); ?>
33 <?php endif; ?>
34 </h1>
35 <?php endif; ?>The attached images show that the “logo” is still h1 and the “article title” is still h2.
I am following your instructions as best I can. So sorry this is a private server so urls not readily available. On the other hand this is with your standard ja_t3_blank so I would think it would be easy to duplicate and it looks like a lot of people are interested.
-
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 27, 2011 at 4:43 am #403238Please post your ftp details and admin details via PM I will resolve this.
July 30, 2011 at 5:45 pm #403731My site is on a private network, however the question is not about any specific site.
It is a question about the way headings are defined in the ja_t3_blank template.
You can get one that is exactly like the one I am using at joomlart.com.
As important, the forum is where Joomlart customers learn new skills.
Even if a Joomlart employee knows how, the value remains in explaining it so we know how.
I tried to follow the various directions and was not able to produce a result.
Please accept my apologies, close this ticket, and I will try again later.
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
July 30, 2011 at 9:07 pm #403750I really think you should use the solution provided by Do Ha. That will do exactly as you are asking. Simply change the <h2></h2> tags to <h1></h1> tags
Personaly I think JA have got it right to use h2 here. Minimal use of h1 tags seems to be the thinking these days and we already have h1 tags used on the page.
August 1, 2011 at 12:48 pm #403988Phil,
Good to hear from you Sir.
Yes of course I will try the solution provided by Do Ha. It resembled what the other gentleman that opened the dialogue suggested so I had no revisited.
As for the tags:
– complete agreement that minimal use of h1 tags, specifically just one per page, is recommended
– IMHO the h1 tag should be on page specific content, not on the logo which is identical for each pageThis request was actually submitted along with another to change the article title from h2 to h1. I split the requests thinking it would simplify the issue 😉
This is the current situation :
logo = h1 (qty 1)
article title = h2
article headings = h3Ideal from my perspective :
logo = whatever, maybe h6
article title = h1 (qty 1)
article headings = h2I will report back but it will take a while because of other stuff.
Thanks.
February 8, 2012 at 6:33 am #437510<em>@phill luckhurst 256582 wrote:</em><blockquote>I really think you should use the solution provided by Do Ha. That will do exactly as you are asking. Simply change the <h2></h2> tags to <h1></h1> tags
Personaly I think JA have got it right to use h2 here. Minimal use of h1 tags seems to be the thinking these days and we already have h1 tags used on the page.</blockquote>
That is a really long way going about changing a basic template attribute. Where is the other H1 tags for that template on an article page? Is it in the logo block with the sitename in H1- pretty sure that’s not good use of H1 either on every single page at expense of a good relevant article title.
-
AuthorPosts
Viewing 13 posts - 1 through 13 (of 13 total)This topic contains 13 replies, has 5 voices, and was last updated by frodojrr 11 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum