Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1022604
    Patrick Rosemeyer
    Participant

    Hi,

    I have a little problem with the structure of heading. I would like to change the headline of the widget in the footer. Actual is h4. I would like to change in text bold 14px. How can I change this?

    Another question is: how can I change the add to cart button link attribute nofollow to do follow?

    My homepage is https://rosemeyers.com

    Thank you in advanced

    Patrick

    #1023052
    Friech
    Moderator

    Hi Patrick,

    Thanks for writing in! For the footer headings you can add this under Custom > CSS in the Customizer.

    .x-colophon.top .h-widget {
    	font-size: 14px;
    	font-weight: bolder;
    	letter-spacing: 1px;
    }

    TO change the attribute of your add to cart button, add the JavaScript below on your Custom JavaScript in the Customizer.

    (function($) {
       $( "a.add_to_cart_button" ).attr( "rel", "follow" );
    })(jQuery);

    Hope it helps, Cheers!

    #1023716
    Patrick Rosemeyer
    Participant

    Hi Friech,

    thank you very much for your reply and your support. The topic with follow links work fine. But the css for the widget heading isnT it what I want. I would like to remove the h4 tag for the heading. It shall be only text not a h-tag.

    Thank you

    Patrick

    #1023822
    John Ezra
    Member

    Hi Patrick,

    Thanks for updating the thread! In order to do that, you will need to write a script to find the h4 tags for that specific section and replace them with regular p tags. Regretfully, writing custom codes/scripts are beyond our scope of support. You could try removing the titles from the widgets and just add a text widget and put the titles in the content are instead of the titles.

    Thanks for understanding. Take care!

    #1023830
    Patrick Rosemeyer
    Participant

    Hi John Ezra,

    thank you for your reply. I can understand, that you can’t code all costumer wishes. But can you tell me where I can find the file, which is determined that the header of the widget is a h4. The change I can then edit it yourself.

    Thank you

    Patrick

    #1024100
    Lely
    Moderator

    Hello Patrick,

    You may add the following on code on your child theme’s functions.php file:

    if ( ! function_exists( 'x_widgets_init' ) ) :
      function x_widgets_init() {
    
        //
        // Default.
        //
    
        register_sidebar( array(
          'name'          => __( 'Main Sidebar', '__x__' ),
          'id'            => 'sidebar-main',
          'description'   => __( 'Appears on posts and pages that include the sidebar.', '__x__' ),
          'before_widget' => '<div id="%1$s" class="widget %2$s">',
          'after_widget'  => '</div>',
          'before_title'  => '<h4 class="h-widget">',
          'after_title'   => '</h4>',
        ) );
    
        //
        // Widgetbar.
        //
    
        $i = 0;
        while ( $i < 4 ) : $i++;
          register_sidebar( array( // 2
            'name'          => __( 'Header ', '__x__' ) . $i,
            'id'            => 'header-' . $i,
            'description'   => __( 'Widgetized header area.', '__x__' ),
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h4 class="h-widget">',
            'after_title'   => '</h4>',
          ) );
        endwhile;
    
        //
        // Footer.
        //
    
        $i = 0;
        while ( $i < 4 ) : $i++;
          register_sidebar( array( // 3
            'name'          => __( 'Footer ', '__x__' ) . $i,
            'id'            => 'footer-' . $i,
            'description'   => __( 'Widgetized footer area.', '__x__' ),
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<p class="h-widget">',
            'after_title'   => '</p>',
          ) );
        endwhile;
    
      }
      add_action( 'widgets_init', 'x_widgets_init' );
    endif;
    

    On the Footer widget, I’ve updated this part:

            'before_title'  => '<h4 class="h-widget">',
            'after_title'   => '</h4>',
    

    To this:

            'before_title'  => '<p class="h-widget">',
            'after_title'   => '</p>',
    

    Hope this helps.

    #1024348
    Patrick Rosemeyer
    Participant

    Hi Lely,

    thank you very much for your support. It works fine.

    Have a nice weekend!

    Patrick

    #1024732
    Joao
    Moderator

    I am glad we managed to help.

    Have a great weekend you too 🙂

    Thanks

    Joao

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