Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #1394881

    Hi,

    How to remove the “title attribute” in post title link, not css hide, I need delete it in the html code

    View post on imgur.com

    #1394882
    #1394890

    Hi,

    Thanks for contacting us!

    Please refer to this post: https://kriesi.at/documentation/enfold/image/#remove-image-alt-title-on-hover

    Best regards,
    Yigit

    #1394893

    Hi,

    It is not image ALT, it is the “title attribute” of post title link

    #1394902

    Hi,

    The code shared in the documentation removes the title attribute from all A and IMG tagged elements.

    If you would like to remove it from A tagged elements only, you can use the code as following

    
    function remove_title_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('#wrap_all a').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');
    

    Best regards,
    Yigit

    #1394907

    Hi,

    I just want to remove the title attribute from post title link, not all A links

    #1394929

    Hi,

    Please add the following code to the bottom of the functions.php file of your child theme in Appearance > Editor

    
    function remove_post_title_title_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.entry-title a').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_post_title_title_attr');
    

    Best regards,
    Yigit

    #1395028

    Hi, it do the work, but how to remove the ” ” in the code

    I just need Title, not “Title”

    View post on imgur.com

    #1395074

    Hi yundian,

    The “” is not part of the title, browsers just add it when you inspect an element.
    You can verify this by editing the text you inspected.

    Best regards,
    Nikko

    #1395075

    Hi,

    In same browser, there isn’t “” in grid post title link:

    View post on imgur.com

    It is just the title, so how to remove the “” showed in post title link of big image feature blog

    #1395080

    Hi yundian,

    That’s because the anchor tag in the post title has multiple elements while the grid post title only has a single element.
    The elements in the post title’s anchor tag are text and the span tag (basically it’s two nodes inside the anchor tag).
    Try to edit the text and you will see it’s not included (or not editable) which suggests it’s not part of the text, also it does not render in the frontend.

    Best regards,
    Nikko

    #1395084

    Thanks for explain, is it normally, there is a blank here?

    View post on imgur.com

    #1395086

    Hi yundian,

    The blank space on the right is not part of it, do you have a white space after the title?
    If does not have that space, then can you setup a staging site for us? so we can try to inspect the backend.
    We will need temporary admin access on it as well, just post the credentials in private content.

    Best regards,
    Nikko

    #1395092

    Hi, I didn’t have a white space after title, you can see all the titles of single feature image posts, all have the blank, please check this page: https://www.yundianseo.com/en-seo/

    For some reasons, I can’t give you a admin access, the problem can be see on All Enfold websites using the single featured image posts, you can have a test.

    #1395101

    @Yigit : please think of changings inside jQuery 3.x
    it is now

    jQuery(window).on('load', function(){
    

    maybe you look inside documentation too if there are older snippets.

    #1395146

    Hi,


    @yundian
    I cannot reproduce the issue on my test installation. Please see the private content field below for the link.


    @Guenni007
    I have updated the line in our documentation :)

    Best regards,
    Yigit

    #1395277

    Hi,

    please use the same blog style:

    View post on imgur.com

    #1395292

    Hi yundian,

    I tested Modern Business with Grid Layout but I don’t get the same results.
    Can you try to flush out cache and temporarily deactivate all plugins and see if the problem still persists?

    Best regards,
    Nikko

    #1395328

    Hi, please check the problem in my test website, page:

    https://www.cheapseo.cn/google-seo/

    Admin access attached

    #1395349

    For the “” problem, I didn’t need multiple elements, just a link will be ok

    Do you have idea to remove the “” ?

    ——————————————————————————————————————–
    Hi yundian,

    That’s because the anchor tag in the post title has multiple elements while the grid post title only has a single element.
    The elements in the post title’s anchor tag are text and the span tag (basically it’s two nodes inside the anchor tag).
    Try to edit the text and you will see it’s not included (or not editable) which suggests it’s not part of the text, also it does not render in the frontend.

    Best regards,
    Nikko

    #1395350

    I don’t need the rel=bookmark, and want to remove the ” “

    #1395463

    Again, from a third place: the quotation marks are not text and do not belong to the Title Text.
    You can easily check this yourself by hovering the mouse over the link. Then the browser shows you the title in a tooltip.
    There you see – no quotation marks. They belong to the attributes of a tag! Nothing more. As with every alt-tag, title-tag src etc. pp …

    (click to enlarge)

    __________
    next: https://html.spec.whatwg.org/multipage/links.html#link-type-bookmark

    why does it disturb your?

    #1395492

    Hi,

    For SEO, I don’t want to tell Google the post titles are bookmarks

    #1395507

    Hi yundian,

    Thanks for giving us admin access.
    You we’re using an outdated version of Enfold (4.7.6.4) which seems to have caused that extra space, it was fixed when I updated your test website to the latest version (5.4).
    As for removing the “” (this can really be ignored since it doesn’t add anything) but if you really want to remove it then, you will need to use a child theme, you can download and find instructions on how to use it here: https://kriesi.at/documentation/enfold/child-theme/ (make sure to import parent theme options).
    Then in your child theme’s functions.php file, add this code (at the bottom):

    function avia_default_title_filter( $current_post )
    {
    	if( ! empty( $current_post['title'] ) )
    	{
    		$default_heading = is_singular() ? 'h1' : 'h2';
    		$args = array(
    					'heading'		=> $default_heading,
    					'extra_class'	=> ''
    				);
    
    		/**
    			* @since 4.5.5
    			* @return array
    			*/
    		$args = apply_filters( 'avf_customize_heading_settings', $args, 'avia_default_title_filter', array( $current_post ) );
    
    		$heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading;
    		$css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : '';
    
    		$output  = '';
    
    		//$output .= "<{$heading} class='post-title entry-title ". avia_offset_class('meta', false). "'>";
    		$output .= "<{$heading} class='post-title entry-title {$css}' " . avia_markup_helper( array( 'context' => 'entry_title', 'echo' => false ) ) . '>';
    
    		if( ! is_singular() )
    		{
    			$output .=	'<a href="' . get_permalink() . '" rel="bookmark" title="' . __( 'Permanent Link:', 'avia_framework' ) . ' ' . esc_attr( $current_post['title'] ) . '">';
    			$output .=		$current_post['title'];
    			$output .=	'</a>';
    		}
    		else
    		{
    			$output .=		$current_post['title'];
    		}
    
    		$output .= "</{$heading}>";
    
    		$current_post['title'] = $output;
    	}
    
    	return $current_post;
    }

    Hope it helps.

    Best regards,
    Nikko

    #1395537

    Hi,

    The “” problem is not important for me, but the blank problem is very bad

    Could you tell me how to fix it based on Enfold (4.7.6.4)

    Because a lot of changes will be removed after update the theme, we can’t do it in short time.

    #1395582

    Hi yundian,

    Please edit includes > helper-post-format.php and delete this line of code(line 79):

    $output .= "			<span class='post-format-icon minor-meta'></span>";

    Best regards,
    Nikko

    #1395690

    Hi,
    The blank problem is still there

    View post on imgur.com

    #1395695

    Hi yundian,

    Please change also this code in line 80:

    $output .= "	</a>";

    to:

    $output .= "</a>";

    Best regards,
    Nikko

    #1395699

    Great, please close

    #1395703

    Hi yundian,

    I’m glad that we could help you :)
    Thanks for using Enfold and have a great weekend!

    Best regards,
    Nikko

Viewing 30 posts - 1 through 30 (of 30 total)
  • The topic ‘How to remove the “title attribute” in post title link’ is closed to new replies.