• Resolved jbgglgdev

    (@jbgglgdev)


    Hi, is it possible to remove this h1 and replace by simple font size ?
    I do prefer to have h1 in the body instead of the page title.

    <header class=”page-header”>
    <font size=”3″ color=”white”><h1 class=”page-title”>Les meilleurs tarifs d’optimisation site web</h1></font>
    </header>

    remove this <h1 class=”page-title”>…….</h1>

    thank you very much
    JB

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @jbgglgdev,

    You can use the filter primer_the_page_title_args to change the h1 to something else.

    example:

    add_filter( 'primer_the_page_title_args', function( $args ) {
       $args['wrapper'] = 'span';
       return $args;
    } );

    You may want to create an MU plugin and add the code snippet to it, so it’s not removed on theme update.

    You can change the wrapper to whatever it is you’d like.

    Thread Starter jbgglgdev

    (@jbgglgdev)

    Hi @eherman24,
    thank’s for that ! and if I wanted to add a font size to that span ?
    I did try, but no succes.

    JB

    Hi @jbgglgdev,

    You should be able to add additional attributes to the ‘atts’ array in the $args parameter.

    Example:

    add_filter( 'primer_the_page_title_args', function( $args ) {
       $args['wrapper'] = 'span';
       $args['atts']['style'] ='font-size: 20px;';
       return $args;
    } );
    Thread Starter jbgglgdev

    (@jbgglgdev)

    as usual perfect solution ! Thnak you very much
    JB

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘remove h1’ is closed to new replies.