Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author mightydigital

    (@mightydigital)

    I’ll try to help as best as I can.

    It sounds like WordPress is using the default blog template “single.php”, you could make edits to this file, but this might also impact your blog.

    So I would suggest that you create a “single-nooz_release.php” file by duplicating your existing “single.php” and renaming it. WordPress should now be looking at this new file as the template for press-release pages, you can now edit this file to make theme layout adjustments to press release pages. You’ll be able to edit author as well as other info.

    Let me know if you have any other questions.

    Plugin Author mightydigital

    (@mightydigital)

    Plugin Author mightydigital

    (@mightydigital)

    @pokermagic just checking in to see if you were able to resolve your problem.

    Let us know if you have any other ideas or issues.

    Thread Starter pokermagic

    (@pokermagic)

    Dear mightydigital,

    Yes thank you all resolved.

    JR

    Hello,

    I have been working on the same issue of removing the sidebar from the press releases and followed these steps the best that I can. I’ve succeeded in creaiting a “single-nooz_release.php” file and removing some of the sidebar content, but there is a line from the sidebar that I can’t seem to get rid of.

    Here is the press release in question: http://valuedrywaterproofing.com/press/press-releases/value-dry-and-basement-masters-partnership/

    FWIW, I am not a website guru of any kind and am figuring this all out for the first time.

    Here is the code for the “single-nooz_release.php” file in case that helps:

    <?php get_header(); ?>
    
    <div id="main-content">
    	<div class="container">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php if (et_get_option('divi_integration_single_top') <> '' && et_get_option('divi_integrate_singletop_enable') == 'on') echo(et_get_option('divi_integration_single_top')); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>>
    					<h1><?php the_title(); ?></h1>
    
    				<?php
    					if ( ! post_password_required() ) :
    
    						et_divi_post_meta();
    
    						$thumb = '';
    
    						$width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 );
    
    						$height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 );
    						$classtext = 'et_featured_image';
    						$titletext = get_the_title();
    						$thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
    						$thumb = $thumbnail["thumb"];
    
    						$post_format = get_post_format();
    
    						if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) {
    							printf(
    								'<div class="et_main_video_container">
    									%1$s
    								</div>',
    								$first_video
    							);
    						} else if ( ! in_array( $post_format, array( 'gallery', 'link', 'quote' ) ) && 'on' === et_get_option( 'divi_thumbnails', 'on' ) && '' !== $thumb ) {
    							print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height );
    						} else if ( 'gallery' === $post_format ) {
    							et_gallery_images();
    						}
    					?>
    
    					<?php
    						$text_color_class = et_divi_get_post_text_color();
    
    						$inline_style = et_divi_get_post_bg_inline_style();
    
    						switch ( $post_format ) {
    							case 'audio' :
    								printf(
    									'<div class="et_audio_content%1$s"%2$s>
    										%3$s
    									</div>',
    									esc_attr( $text_color_class ),
    									$inline_style,
    									et_pb_get_audio_player()
    								);
    
    								break;
    							case 'quote' :
    								printf(
    									'<div class="et_quote_content%2$s"%3$s>
    										%1$s
    									</div> <!-- .et_quote_content -->',
    									et_get_blockquote_in_content(),
    									esc_attr( $text_color_class ),
    									$inline_style
    								);
    
    								break;
    							case 'link' :
    								printf(
    									'<div class="et_link_content%3$s"%4$s>
    										<a href="%1$s" class="et_link_main_url">%2$s</a>
    									</div> <!-- .et_link_content -->',
    									esc_url( et_get_link_url() ),
    									esc_html( et_get_link_url() ),
    									esc_attr( $text_color_class ),
    									$inline_style
    								);
    
    								break;
    						}
    
    					endif;
    				?>
    
    					<div class="entry-content">
    					<?php
    						the_content();
    
    						wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'Divi' ), 'after' => '</div>' ) );
    					?>
    					</div> <!-- .entry-content -->
    
    					<?php
    					if ( et_get_option('divi_468_enable') == 'on' ){
    						echo '<div class="et-single-post-ad">';
    						if ( et_get_option('divi_468_adsense') <> '' ) echo( et_get_option('divi_468_adsense') );
    						else { ?>
    							<a href="<?php echo esc_url(et_get_option('divi_468_url')); ?>"><img src="<?php echo esc_attr(et_get_option('divi_468_image')); ?>" alt="468" class="foursixeight" /></a>
    				<?php 	}
    						echo '</div> <!-- .et-single-post-ad -->';
    					}
    				?>
    
    					<?php
    						if ( ( comments_open() || get_comments_number() ) && 'on' == et_get_option( 'divi_show_postcomments', 'on' ) )
    							comments_template( '', true );
    					?>
    				</article> <!-- .et_pb_post -->
    
    				<?php if (et_get_option('divi_integration_single_bottom') <> '' && et_get_option('divi_integrate_singlebottom_enable') == 'on') echo(et_get_option('divi_integration_single_bottom')); ?>
    			<?php endwhile; ?>
    
    	</div> <!-- .container -->
    </div> <!-- #main-content -->
    
    <?php get_footer(); ?>

    Appreciate any help!

    – Lewis

    Plugin Contributor farinspace

    (@farinspace)

    in your css add the following:

    body.single-nooz_release #main-content .container::before {
        display: none;
    }
    

    Your theme must have some custom styles which put the vertical line which separates the sidebar. The above should remove it only from press-release pages.

    @farinspace

    This did the trick! Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Remove sidebars from press releases’ is closed to new replies.