Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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.

    #1081230

    Hey alejandrox86,

    Could you post a link to where we can see the elements in question please? Also, what is normal formatting?

    Best regards,
    Rikard

    #1081666

    Hello,

    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, 9 months ago by ProMarketer.
    #1082989

    Hi,

    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,
    Ismael

    #1083352

    It worked! Thanks a lot! <3

    Best Regards,

    Alessandro.

    #1083354

    If you have the code to add in function.php also to change the markup of the share box title (h5) it would be great

    #1083356

    I’m referring to the sharing box at the end of the homepage https://gyazo.com/3f212d3685e43ca278aaf95f3d88039a

    #1084330

    Hi,

    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,
    Ismael

    #1085836

    Great! You’ve been awesome! Thanks a lot.

    Best Regards,

    Alessandro.

    #1086317

    Hi 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,
    Rikard

    #1086328

    Hi Rikard,

    Yes, sure. We can close it.

    Thanks a lot again.

    Best Regards,

    Alessandro.

    #1086806

    Hi,

    Great, thanks for letting us know. I’ll close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Changing h2 to normal formatting in last post feed’ is closed to new replies.