Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #32718

    Andreas S
    Participant

    Hello!

    I have tried to read , and search the forum for a solution – but cant seem to find it. English isnt my first language , so maybe I am using the wrong words.

    I am looking for a simple Custom CSS solution for removing, hiding the “Permalink to – square” that pops up when you hover a Portfolio, and Blog.

    Permalinks to Hover

    I am using Integrity Dark.
    I just dont want it to be seen at all. No need for it.

    Thank you!
    A

    #32824

    Support
    Member

    Hi there!

    Thank you for using the theme!

    That is a browser feature and we can’t control that within the theme without removing the title attribute of the links. If you don’t need the title attribute, please edit framework > views > integrity > content-portfolio.php, find this code on line 52:

    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a>
    

    Replace it with:

    <a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a>
    

    I hope that helps.

    #32902

    Andreas S
    Participant

    Ahaa, okaj! Thank you for your fast answer!

    I love your theme!!!!

    /Andreas

    #32998

    Rad
    Moderator

    Hi Andreas,

    You’re very welcome!

    Thank You.

    #44456

    Christopher L
    Participant

    I did that in my child theme, and it didn’t change anything.

    #44686

    Christian
    Moderator

    Hey Chris,

    Can you give us the details of your setup?

    – WordPress version
    – X and plugins version
    – Stack your using

    Thanks.

    #44699

    Christopher L
    Participant

    Apologies for the omission. And it never hurts to reiterate how superb your support and your theme are.

    I can see you’ve got ’round-the-clock support teams at work now. How many copies of X are out there?

    WordPress 3.9.1
    X 1.8.5
    x Shortcodes 2.2.2
    Integrity Light

    You can see how intrusive the permalink tooltip is in this case: http://betsylittle.com/wp/listings/

    Cheers, Christopher

    #44953

    Rad
    Moderator

    Hi Chris,

    It is not advisable to remove you link titles permanently because it will help your site’s SEO grade. Unless you really intend to remove it.

    This approach will have same results, and no hover title for links.

    Add this code at your customizer’s custom javascript.

    jQuery(function($){
    $(document).ready(function(){
    $('a').attr('title','');
    });
    });

    Hope this helps.

    #45389

    Christopher L
    Participant

    I tired both techniques, and neither worked.

    ” title=””><?php the_title(); ?> in content.portfolio.php

    and the jQuery code:

    jQuery(function($){
    $(document).ready(function(){
    $(‘a’).attr(‘title’,”);
    });
    });

    At present the jQuery code is active. Please see http://betsylittle.com/wp/listings/

    #45557

    Christian
    Moderator

    Hey Chris,

    Please undo your changes and give us access to your WordPress admin and FTP so we could see your setup.

    Thanks.

    #45671

    Christopher L
    Participant
    This reply has been marked as private.
    #45801

    Christian
    Moderator

    Hey Chris,

    I went ahead and added the code needed to remove the title attribute in your functions.php. The code is

    // Remove Featured Image Title Attribute
    
    function x_featured_image( $cropped = '' ) {
    
      $stack          = x_get_stack();
      $page_full      = is_page_template( 'template-layout-full-width.php' );
      $post_full      = get_post_meta( get_the_ID(), '_x_post_layout', true ) == 'on';
      $blog_full      = is_home() && get_theme_mod( 'x_blog_layout' ) == 'full-width' && get_theme_mod( 'x_blog_style' ) == 'standard';
      $archive_full   = is_archive() && ! is_post_type_archive( 'x-portfolio' ) && get_theme_mod( 'x_archive_layout' ) == 'full-width' && get_theme_mod( 'x_archive_style' ) == 'standard';
      $site_full      = get_theme_mod( 'x_' . $stack . '_layout_content' ) == 'full-width';
      $portfolio_full = $stack == 'integrity' && is_singular( 'x-portfolio' );
      $fullwidth      = $page_full || $post_full || $blog_full || $archive_full || $site_full || $portfolio_full;
    
      if ( has_post_thumbnail() ) {
    
        if ( $cropped == 'cropped' ) {
          if ( $fullwidth ) {
            $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped-fullwidth', NULL );
          } else {
            $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-cropped', NULL );
          }
        } else {
          if ( $fullwidth ) {
            $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack . '-fullwidth', NULL );
          } else {
            $thumb = get_the_post_thumbnail( NULL, 'entry-' . $stack, NULL );
          }
        }
    
        switch ( is_singular() ) {
          case true:
            printf( '<div class="entry-thumb">%s</div>', $thumb );
            break;
          case false:
            // printf( '%3$s',
            printf( '%3$s',
              esc_url( get_permalink() ),
              esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
              $thumb
            );
            break;
        }
    
      }
    
    }
    

    Hope that helps. 🙂

    #45960

    Christopher L
    Participant

    This is completely wonderful! Thank you so much. One question though: will this be overwritten with an update? Thx, Christopher

    #46119

    Alexander
    Keymaster

    Hi there,

    Thanks for letting us know! Glad to hear it’s working for you! We added this to functions.php of a child theme, so it won’t get overwritten on an update. 🙂 Take care!

    #46121

    Christopher L
    Participant

    Many thanks