-
AuthorPosts
-
July 18, 2014 at 3:39 pm #5708
Alex
GuestI am trying Frontier theme on my new blog http://malware-detective.com/. It is great. However, there is a problem that SEO evaluation apps and Webmasters tools point to. I need to add description tag to my homepage and alt to my logo image. <H1> should be present on each page. So, I need some function in header.php to set <H1> tag conditionaly, depend on Home or Post page types. How can I do this? I think that these common problems solutions incorporated in Frontier theme will make it one of the greatest and most used WordPress themes on the web.
July 19, 2014 at 12:38 am #5712Ron
KeymasterFrontier already has an H1 tag, the Site Title. But it looks like you disabled it.
Go toFrontier Options -> Display -> Top Bar
Enable Site Title (which has the H1 tag) and disable Site Description.
You can then control what is displayed on the title by using this filter. Add this code on a child-theme functions.php
function frontier_top_bar_title_text() { return 'Malware Removal & Advanced PC Protection'; } add_filter( 'frontier_top_bar_title', 'frontier_top_bar_title_text' );
If you need even more control then you can disable both Title and Description and use the action “frontier_before_top_bar” where you can output anything you want.
July 19, 2014 at 12:56 am #5713Ron
KeymasterBy description tag you mean the meta description on the
<head>
right? That can’t be added to the theme since that is a plugin territory functionality and is against wordpress.org’s theme guidelines. You can simply use any SEO plugin like Yoast.For the alt value on the logo, I’ve already added a default value for the next update. If you want more control you can either edit header.php or disable the logo and add a Text Widget on your header area where you can add your own logo markup.
July 20, 2014 at 5:06 am #5717Alex
GuestI forgot to mention the idea suggested for SEO complience. For Homepage the site title is H1, and for Post pages it is H2 while the Post headline is H1 tag.
July 20, 2014 at 6:21 am #5718Ron
KeymasterLike I said on my reply, for more control you can use the frontier_before_top_bar action to output anything. Disable both Top Bar Title and Description then on a child-theme functions.php add the example below.
Example:
function ra_top_bar_text() { $tag = is_front_page() ? 'h1' : 'h2' ; echo '<' . $tag . ' id="site-description">Your Text</' . $tag . '>'; } add_action( 'frontier_before_top_bar', 'ra_top_bar_text' );
July 21, 2014 at 4:52 am #5725Alex
GuestThank you very much, Ron. I think it should work when I will set a child to Frontier theme. Actually, I started with a child theme because I needed many custom things, but I dropped this idea after some update with elements’ names changes. I just got lost in code, dropped the child, and started all over with custom CSS instead. Now, I afraid to update theme on the site before I will test it on a local server. Where can I find the information on details of consequent Frontier updates? It will help to adjust child theme as needed.
Thank you again for your quick response and clear explanation.
July 21, 2014 at 8:40 am #5726Ron
KeymasterWhere can I find the information on details of consequent Frontier updates
https://ronangelo.com/frontier/theme-changelog/
There’s already a link to this page on Frontier Options.You can check that before updating. Theme updates are usually just minor changes but if there were major changes then that would be written on the changelog page.
July 21, 2014 at 2:17 pm #5727Alex
GuestThank you, Ron. Now, I see it was 1.1.4 when my child theme got broken. Fortunately, it was on a local server. I found Asteroid about 2 years ago, and since then I was sure that it is the best of free themes in terms of user’s interface and flexibility. I started to play with child themes, and then Frontier arrived. It was bingo! Thanks for this great theme. I will donate it’s development as soon as I get a positive cash flow.
-
AuthorPosts
- The forum ‘Frontier’ is closed to new topics and replies.