Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #555901

    Hi,

    I had this problem before, but the code I used then is not working now.
    I a single post I would like to replace “blog – Latest posts” with the post title.
    Can you please help me with the code to place the post’s title instead?

    Thank you.

    #555905

    Hi eyeweb!

    Do you mind creating a temporary admin login and posting it here privately?

    Regards,
    Yigit

    #555921

    Here it is:

    #555930

    Hey!

    I adjusted the code slightly and added to functions.php file of your child theme. Please review your website now

    Best regards,
    Yigit

    #555933

    Hi Yigit,

    Now there are 2 titles with H1.
    Is it possible to remove the inner one?

    Thank you!

    #555936

    Hi!

    I adjusted the code and changed title bar title to div tag instead of h1.

    Regards,
    Yigit

    #555938

    Hi,

    Can you please remove the second one?

    #555946

    Hi!

    Please go to Enfold/includes/helper-post-format.php file and find

    $heading = is_singular() ? "h1" : "h2";

    and change it to

    $heading = is_singular() ? "h2" : "h2";

    Regards,
    Yigit

    #555955

    Hi,

    I copied the file to the child theme and made the change.
    Nothing happens (I think).
    Can you please check?

    #556100

    Still need help.

    #556106

    Hey!

    Please add following code to Functions.php file of your child theme

    function avia_default_title_filter($current_post)
    	{
    		if(!empty($current_post['title']))
    		{
    			$heading = is_singular() ? "h2" : "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;
    	}

    Regards,
    Yigit

    • This reply was modified 8 years, 4 months ago by Yigit.
    #556118

    Hi Yigit,

    I added the code, but the title still displays twice.
    Also in products.
    I would like to remove the second one.

    #556427

    Hi Yigit,
    I still need help with this issue.
    Can you please take a look again?

    #557360

    Hey!

    We added this code in the functions.php in order to remove the default title:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
    

    Regards,
    Ismael

    #557397

    Thank you.
    Is it possible to do so also in single post?

    #557511

    Hi!

    Try commenting out line 209 in the /enfold/includes/loop-index.php file.

    echo $title;
    

    If you want to do this in a child theme then copy the file to your child theme and edit it there, /child-theme/includes/loop-index.php.

    Regards,
    Elliott

    • This reply was modified 8 years, 3 months ago by Elliott.
Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.