hi , I have a WordPress theme (Sensational ) . The issue is that , the titles of the posts are in H2 , but i need H1 . Anyone can help me in this issue ? I want that my posts must contain titles that must be in H1 only.
You can change the HTML code of your themes from admin panel. This is how it usually works: Log in to your WP admin panel and go to Appearance -> Editor. After that, from the right hand side choose the file you want to modify. Index.php is usually the file you want to modify if you want to change HTML tags for the front page. For every individual page, modify the file page.php. After modifying, if you have a caching plugin, you can empty the cache for the chances to take place immediately. Some themes have their own way of making changes to them. For example, the procedure would differ from above if you were using Thesis theme. However, most themes work the way described above. So give it a go. Hope this helps.
Thanks for your suggestion , but i am searching for a perfect way , means step by step work , so that i can easily change that without any problem . So if you have proper knowledge of this , you can tell me some more deeply ,if possible .
1. Log in to your WP admin panel. 2. Navigate to Appearance -> Editor. 3. From right hand side, choose single.php. (That's the file you probably want, though you can make changes in page.php and index.php also). 4. Find <?php the_title(); ?> from the code. That's a small PHP snippet which dynamically shows the titles of your posts. It's probably surrounded by <h2> and </h2> tag. Just change them to <h1> and </h1>. 5. Save the file. There you go. If your theme follows the typical way to change WP HTML files, this should work. If not, somebody familiar with the Sensational theme should come to rescue.
Title in post always using H1 while the site name using H2. In other pages such as category and tag, Site name become H1 and category/tag title become H2. Changing post title to H1 is quite easy. However, you should consider the effect on doing it. Heading is used to make the site readable and easy to be read (both by bots and human). If you change H2 to H1, you should also change another element from H1 to H2 because having more than one H1 is not good idea. Off course multiple H1 in page is allowed but it is better to only use single H1. So, How to change H2 to H1? It can be easy (depend on each theme). Find any element in: Header files (usually header.php) Other specific pages which you want to change single.php page.php index.php loop.php tag.php archive.php author.php search.php 404.php front.php *each themes has different files.* You just need to make simple change. Just change H2 to H1 in 'specific pages' and change H2 to H1 in header. Warning: Each theme was coded to work in special condition using special technique. It mean your the theme may use 'switch'. There would be 'if' statement in the codes. Suggestion: You should make site-name as H1 in homepage/frontpage. In single post, Site-name become H2 and post title become H1. In other pages such as category and tag, site-name become H2 and category/tag title become H1. Search, archive and 404 pages may use the same setup. You just need to make a code which detect what page it is and what heading should be used. If_frontpage, Is_search and Is_single are simple condition which can be used to detect the pages. Here is simple code that can be used to achieve the same goal. <?php if( !is_singular() ) echo '<h2>'; else echo '<h1>'; ?> <a href="<?php echo home_url() ?>/"><?php bloginfo('name'); ?></a> <span><?php bloginfo( 'description' ); ?></span> <?php else : ?> <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/"> <img src="<?php echo $logo ; ?>" alt="<?php bloginfo('name'); ?>" /><strong><?php bloginfo('name'); ?> <?php bloginfo( 'description' ); ?></strong> </a> <?php endif; ?> <?php if( !is_singular() ) echo '</h2>'; else echo '</h1>'; ?> PHP: The code above is just an example. You can use it but you should edit it first to match the 'configuration' used by your theme. The code should be optimized too. I may able to help you with step by step on what need to be done. But I believe you can do it by yourself. If you still need help, it is better to attach the files (not whole theme, just required files) in this thread. By doing so, other may able to give you the right direction on how to modify your theme.