Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,162,734 members, 7,851,526 topics. Date: Wednesday, 05 June 2024 at 09:29 PM |
Nairaland Forum / Science/Technology / Programming / How To Add Page Title As H1 Tag On Wordpress Loop? (1140 Views)
How Do I Create Space Between The Menu(nav) And <h1> - Snapshot / Advice On How To Start A Peer To Peer Lending/ Donation Website On Wordpress / Help With Python Program (simple While Loop) (2) (3) (4)
How To Add Page Title As H1 Tag On Wordpress Loop? by asadul549(m): 8:48pm On Oct 29, 2016 |
<?php if(!has_post_format('quote')) : ?> <div class="clearfix"> <div class="entry-content"> <?php $dfd_post_content = get_the_excerpt(); ?> <?php echo !empty($dfd_post_content) ? '<p>'.$dfd_post_content.'</p>' : ''; ?> <?php $read_more_style = (isset($dfd_ronneby['style_hover_read_more']) && !empty($dfd_ronneby['style_hover_read_more'])) ? $dfd_ronneby['style_hover_read_more'] : 'chaffle'; ?> <a href="<?php echo the_permalink(); ?>" title="<?php the_title(); ?>" class="more-button <?php echo esc_attr($read_more_style); ?> left" data-lang="en"><?php _e('Continue', 'dfd'); ?></a> <div class="entry-meta right"> <?php get_template_part('templates/entry-meta/mini', 'comments'); ?> </div> </div> </div> <?php endif; ?> How to place a header(h1) tag below the "entry-content" class. |
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by toheebDOTcom(m): 10:10pm On Oct 29, 2016 |
The header tag should wrap your title but you declared it way below the excerpt for some reason best known to you though. Add it like you added the div tag. straight below it. |
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by asadul549(m): 10:17pm On Oct 29, 2016 |
toheebDOTcom: ok so I want keep the text "Camera shop" between h1 tag. So now please tell me what will be the code so that I can input? |
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by asadul549(m): 10:18pm On Oct 29, 2016 |
I already tried it once but still same. <?php if(!has_post_format('quote')) : ?> <div class="clearfix"> <div class="entry-content"> <h1>Camera Shop</h1> <?php $dfd_post_content = get_the_excerpt(); ?> <?php echo !empty($dfd_post_content) ? '<p>'.$dfd_post_content.'</p>' : ''; ?> <?php $read_more_style = (isset($dfd_ronneby['style_hover_read_more']) && !empty($dfd_ronneby['style_hover_read_more'])) ? $dfd_ronneby['style_hover_read_more'] : 'chaffle'; ?> <a href="<?php echo the_permalink(); ?>" title="<?php the_title(); ?>" class="more-button <?php echo esc_attr($read_more_style); ?> left" data-lang="en"><?php _e('Continue', 'dfd'); ?></a> <div class="entry-meta right"> <?php get_template_part('templates/entry-meta/mini', 'comments'); ?> </div> </div> </div> <?php endif; ?> |
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by tohero(m): 7:50am On Oct 30, 2016 |
What do you Intend to achieve? Get dynamic content from the database or static content? What were you expecting to see? What are you seeing? What haven't you seen? Note dat You haven't created the wp loop yet, at least in the snippet you posted. |
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by asadul549(m): 2:32am On Oct 31, 2016 |
My intention was to fix the hentry errors on webmaster so that I need to put a header tag with "entry-title" class.
|
Re: How To Add Page Title As H1 Tag On Wordpress Loop? by asadul549(m): 2:33am On Oct 31, 2016 |
tohero: At last it solved. Specially thanks to you man! 1 Like |
(1) (Reply)
Efritin App Clone Needed, Programmers Are Needed Here / Get A US Phone Number / Please Guys, I Really Need Some Good Laravel Ebooks
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14 |