• Resolved frenchomatic

    (@frenchomatic)


    Similar problem to pages except the space is being inserted just after the <h1> like so <h1> title</h1> . This appears to happen on tag pages.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @frenchomatic

    Can you please send me the exact screenshot of extra space in the H1 tag?
    please let us know.

    Thread Starter frenchomatic

    (@frenchomatic)

    This happens on archives, pages and tag pages where an additional space is put into the </h1>. For pages and archives it puts a space just before the closing </h1> tag. For tag pages it puts the space just after the opening <h1> tag. This is design 2 and latest plugin. It is because the php tags have lines before the html starts.

    https://files.fm/u/asv2btu8

    So for example this is ok because the </h1> doesn’t break onto a new line on the echo.

    <?php global $redux_builder_amp;
    do_action('ampforwp_above_the_title',$this); ?>
    <header class="amp-wp-article-header ampforwp-title">
    	<h1 class="amp-wp-title"><?php 
    		$ampforwp_title = $this->get( 'post_title' );
    		$ampforwp_title =  apply_filters('ampforwp_filter_single_title', $ampforwp_title);
    		echo wp_kses_data( $ampforwp_title );?></h1>

    but this as you have it in title.php for example is not ok because the </h1> is sitting on a new line.

    <?php global $redux_builder_amp;
    do_action('ampforwp_above_the_title',$this); ?>
    <header class="amp-wp-article-header ampforwp-title">
    	<h1 class="amp-wp-title"><?php 
    		$ampforwp_title = $this->get( 'post_title' );
    		$ampforwp_title =  apply_filters('ampforwp_filter_single_title', $ampforwp_title);
    		echo wp_kses_data( $ampforwp_title );?>
    	</h1>
    • This reply was modified 6 years, 7 months ago by frenchomatic.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘On tag pages H1 tag includes extra space’ is closed to new replies.