• Resolved jbgglgdev

    (@jbgglgdev)


    Hi, is there a way, for tag page only, to make the page-title a H1 ? I know that for the other pages I already asked you to replace that H1 page-title… but I noticed that I only need it on those tag pages.
    I applied this :

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

    so of course this did also replaced the H1 on tag pages.

    Thank you for the help
    JB

    The page I need help with: [log in to see the link]

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

    You can use a conditional to check what page you are on and either add the arguments or not depending on how you want things to function.

    I’d think something like the following should work:

    add_filter( 'primer_the_page_title_args', function( $args ) {
    
       if ( ! is_tag() ) {
    
          $args['wrapper']       = 'span';
          $args['atts']['style'] = 'font-size: 20px;';
    
       }
    
       return $args;
    
    } );
Viewing 1 replies (of 1 total)
  • The topic ‘add H1 to /tag/ pages’ is closed to new replies.