• Resolved Toni

    (@tools4toni)


    I am using a child theme. I want the sidebar gone on the single post page.
    I am guessing…
    I need to, I think, make a copy of the php file in the parent theme.
    Then put that copy with child theme.
    And delete a line of code.

    1). This is the end of the code for a single post page. I want the sidebar gone. Can I just delete <?php get_sidebar(); ?> ?

    <?php endwhile; // end of the loop. ?>
    
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    2). Where do I put the copy of the php file for the child theme?

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Toni

    (@tools4toni)

    <div class="entry-content" itemprop="articleBody">
       DELETE START HERE--> <?php
    	if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      	the_post_thumbnail('full', array('itemprop' => 'image'));}
    	?> <----DELETE END HERE
    		<?php the_content(); ?>
    		<?php
    			wp_link_pages( array(
    				'before' => '<div class="page-links">' . __( 'Pages:', 'base' ),
    				'after'  => '</div>',
    			) );
    		?>
    	</div>

    Can I delete from “DELETE START HERE–>” to “<—-DELETE END HERE” to remove the featured image from the single post page?

    Thank you

    ——-And I still don’t know where to put the copied parent files into the child theme.

    Thread Starter Toni

    (@tools4toni)

    I deleted in the parent theme and it worked.

    Now to get it to the child theme.

    Thread Starter Toni

    (@tools4toni)

    The plugin can dupe php theme files to child theme!

    Thanks: https://www.ads-software.com/plugins/child-theme-configurator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can I just delete "get_sidebar" to remove sidebar?’ is closed to new replies.