Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1273106
    Steve
    Participant

    Hi,

    I’ve made some changes to the x_integrity_entry_meta() function by copying the function from integrity.php into my child theme functions.php (so I could remove the author and date and change the category icon to an open folder – really easy to do!).

    I’d like to remove the link from the category list (just have the icon and the category name with no clickable link through to the category page).

    I know I need to change…

    foreach ( $categories as $category ) {
            $categories_output .= '<a href="'
                                . get_category_link( $category->term_id )
                                . '" title="'
                                . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                                . '"><i class="x-icon-open-folder" data-x-icon=""></i> '
                                . $category->name
                                . '</a>'
                                . $separator;
          }
         
    
          $categories_list = sprintf( '<span>%s</span>',
            trim( $categories_output, $separator )
          );
        }

    Could you help me remove the <ahref link, just displaying the category name?

    Thanks in advance.

    Wordpress version: 4.61
    X version: 4.6.4
    Cornerstone: 1.3.3

    Website currently under maintenance (st-and.co.za), but I don’t think you’ll need access to the site for this 🙂

    #1273117
    Paul R
    Moderator

    Hi,

    You can change the code to this.

    
    foreach ( $categories as $category ) {
            $categories_output .= '<i class="x-icon-open-folder" data-x-icon=""></i> '
                                . $category->name                          
                                . $separator;
          }
         
    
          $categories_list = sprintf( '<span>%s</span>',
            trim( $categories_output, $separator )
          );
        }
    

    Hope that helps.

    #1273122
    Steve
    Participant

    Hi Paul,

    That ranks as the FASTEST response I’ve ever had from any theme support over the many years I’ve been using WordPress 🙂

    Works perfectly, thanks x 1000

    Steve

    #1273142
    Christian
    Moderator

    You’re welcome. Glad we could help.

  • <script> jQuery(function($){ $("#no-reply-1273106 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>