-
AuthorPosts
-
March 19, 2019 at 4:16 am #1080201
Hello,
I see the titles on the last posts sections in h2 tag. Can you please tell me how I change them to normal formatting? ( https://gyazo.com/6709909b301566f7562872bc67b73e84 )
Also the share box is in h5. I want to change to normal formatting: https://gyazo.com/4444ddcbeb475c4d0ff6f4ed71b7d404
Thanks a lot.
Alex.
March 21, 2019 at 8:41 am #1081230Hey alejandrox86,
Could you post a link to where we can see the elements in question please? Also, what is normal formatting?
Best regards,
RikardMarch 22, 2019 at 2:25 am #1081666Hello,
Sure. The website is this one: ProMarketer.it.
You can scroll to the end of the home page to see the last posts section. At the moment the last post titles are:
– Keyword Tool Dominator (KTD): Recensione, Opinioni, Coupon Code, Alternative Gratis, Guida In Italiano Di Amazon Keyword Tool
– Jungle Scout: Cos’è, Come Funziona, Costo, Web App, Chrome Extension, Alternative Per Amazon FBA.
– Antonio Vida: Chi È, Cosa Fa, Webinar, Corso, Opinioni, Recensioni.All of those titles are in h2. I just don’t want they are in h2 but just normal text.
Same with the “share box” title (Condividi questo sito) which is in h5. You can see the share box below the last posts section.
Best Regards,
Alessandro Sabbatini
- This reply was modified 5 years, 8 months ago by ProMarketer.
March 26, 2019 at 8:09 am #1082989Hi,
Thanks for the update.
You can use this filter in the functions.php file to adjust the markup of the title.
remove_filter( 'post-format-standard', 'avia_default_title_filter', 10, 1 ); add_filter( 'post-format-standard', 'avia_default_title_filter_mod', 10, 1 ); function avia_default_title_filter_mod($current_post) { if(!empty($current_post['title'])) { $heading = is_singular() ? "h1" : "h2"; $output = ""; //$output .= "<{$heading} class='post-title entry-title ". avia_offset_class('meta', false). "'>"; $output .= "<{$heading} class='post-title entry-title' ".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).">"; $output .= " <a href='".get_permalink()."' rel='bookmark' title='". __('Permanent Link:','avia_framework')." ".$current_post['title']."'>".$current_post['title']; $output .= " <span class='post-format-icon minor-meta'></span>"; $output .= " </a>"; $output .= "</{$heading}>"; $current_post['title'] = $output; } return $current_post; }
Adjust this line:
$heading = is_singular() ? "h1" : "h2";
Best regards,
IsmaelMarch 27, 2019 at 3:07 am #1083352It worked! Thanks a lot! <3
Best Regards,
Alessandro.
March 27, 2019 at 3:10 am #1083354If you have the code to add in function.php also to change the markup of the share box title (h5) it would be great
March 27, 2019 at 3:26 am #1083356I’m referring to the sharing box at the end of the homepage https://gyazo.com/3f212d3685e43ca278aaf95f3d88039a
March 28, 2019 at 11:57 pm #1084330Hi,
You can change that but you have to modify the includes > helper-social-media.php file directly. Look for this code around line 221.
$this->html .= "<h5 class='av-share-link-description av-no-toc'>"; $this->html .= apply_filters('avia_social_share_title', $this->title , $this->args); $this->html .= "</h5>";
Best regards,
IsmaelApril 2, 2019 at 5:30 am #1085836Great! You’ve been awesome! Thanks a lot.
Best Regards,
Alessandro.
April 3, 2019 at 4:17 am #1086317Hi Alessandro,
Great, I’m glad we could help. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardApril 3, 2019 at 4:38 am #1086328Hi Rikard,
Yes, sure. We can close it.
Thanks a lot again.
Best Regards,
Alessandro.
April 4, 2019 at 7:30 am #1086806 -
AuthorPosts
- The topic ‘Changing h2 to normal formatting in last post feed’ is closed to new replies.