0
votes

I have a page-header that is getting copied over to all of my blog posts that I want to remove completely. I am removing it visually via CSS, but SEO crawlers are still picking it up via the tag.

I am using a standard wordpress them augmented with Elementor. Here is a screenshot of the SEO report.

And here is a screenshot of the actual HTML code

Let me know if any of you have any additional questions! Thank you for your help!

1
you have to modify your theme file - Mason
Can you explain to me how to do that? Sorry, I am kind of a novice at this. - theteej83
what is the theme name? - Mason
OceanWP augmented by Elementor - theteej83
that html tag you highlighted is in oceanwp/partials/page-header.php - Mason

1 Answers

0
votes

You can make a conditional statement that just outputs the title of the post if on single blog posts, so something like this

<div class="container clr page-header-inner">

        <?php
        // Return if page header is disabled
        if ( oceanwp_has_page_header_heading() ) { ?>
           <!-- check to see if single blog posts -->
           <?php if (is_single()) : ?>
                <h1><?php echo get_the_title(); ?></h1>
           <!-- otherwise show the existing title format -->
           <?php else: ?>
               <<?php echo esc_attr( $heading ); ?> class="page-header-title clr"<?php oceanwp_schema_markup( 'headline' ); ?>><?php echo wp_kses_post( oceanwp_title() ); ?></<?php echo esc_attr( $heading ); ?>>
           <?php endif; ?>

            <?php get_template_part( 'partials/page-header-subheading' ); ?>

        <?php } ?>

        <?php if ( function_exists( 'oceanwp_breadcrumb_trail' ) ) {
            oceanwp_breadcrumb_trail();
        } ?>

    </div><!-- .page-header-inner -->

you would have to replace the existing code