WordPress.org

Ready to get started?Download WordPress

Forums

WP Job Manager
[resolved] Remove Sidebar from Job Listing Pages (11 posts)

  1. ToddWelch
    Member
    Posted 2 months ago #

    Is there any way to remove the side bar when viewing a job? On the job listing page I can remove the side bar because the option is available from the theme that I use but for jobs I do not have that option so the side bar shows up.

    https://wordpress.org/plugins/wp-job-manager/

  2. mikejolley
    Member
    Plugin Author

    Posted 2 months ago #

    Hi Todd,

    If you create a single-job_listing.php file in your theme (or child theme) and copy the contents of single.php to it, you can then remove the get_sidebar() call from the code.

  3. ToddWelch
    Member
    Posted 2 months ago #

    Unfortunately that did not work. No option to disable the side bar.

  4. FourLeafed
    Member
    Posted 2 months ago #

    Hi Todd,

    can you please describe your problem in more detail so we can help you find a solution? For instance, what theme are you using and can you share a link with us?

    Cheers, Evert

    [edit] if you are displaying the jobs on a page via the [jobs] shortcode you need to disable the sidebar for that specific page/pages. Does that help?

  5. mikejolley
    Member
    Plugin Author

    Posted 2 months ago #

    So are you talking about single listings, or archives? Post your template code online which you attempted based on my earlier suggestion.

  6. ToddWelch
    Member
    Posted 2 months ago #

    I want to get rid of the side bar here: http://www.changingworldexchange.org/job/office-assistant-volunteer/

    Here is the code that I pasted into wp-job-manager/templates/content-single-job_listing.php

    I even tried removing the section <?php get_sidebar(); ?> with no effect.

    <?php
    /**
     * The default template for displaying Single posts
     *
     * @package WordPress
     * @subpackage Charitas
     * @since Charitas 1.0
     */
    ?>
    
    <?php get_header(); ?>
    <?php $parallax_image = get_post_meta(get_the_ID(), 'wpl_parallax_image', true); ?>
    
    <?php while ( have_posts() ) : the_post(); // start of the loop.?>
    
    	<?php if( $parallax_image ) { ?>
    		<div class="item teaser-page" style="background: transparent url(<?php echo $parallax_image ?>) 0px -100px fixed no-repeat; ">
    	<?php } else {?>
    		<div class="item teaser-page-list">
    	<?php } ?>
    
    		<div class="container_16">
    			<aside class="grid_10">
    				<h1 class="page-title"><?php the_title() ?></h1>
    			</aside>
    			<?php if ( ot_get_option('wpl_breadcrumbs') != "false") { ?>
    				<div class="grid_6">
    					<div id="rootline">
    						<?php wplook_breadcrumbs(); ?>
    					</div>
    				</div>
    			<?php } ?>
    			<div class="clear"></div>
    		</div>
    	</div>
    
    <?php endwhile; // end of the loop. ?>
    
    <div id="main" class="site-main container_16">
    	<div class="inner">
    		<div id="primary" class="grid_11 suffix_1">
    			<?php get_template_part( 'content', get_post_format() ); ?>
    		</div><!-- #content -->
    
    		<?php get_sidebar(); ?>
    		<div class="clear"></div>
    	</div><!-- #primary -->
    </div>	
    
    <?php get_footer(); ?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  7. FourLeafed
    Member
    Posted 2 months ago #

    Hi Todd,

    you need to duplicate the 'templates' folder from the plugin to your theme. Then rename that folder to 'job-manager'.

    See the section 'Overriding templates via a theme' at the docs.

  8. mikejolley
    Member
    Plugin Author

    Posted 2 months ago #

    Actually, to quote myself from earlier:

    If you create a single-job_listing.php file in your theme (or child theme) and copy the contents of single.php to it, you can then remove the get_sidebar() call from the code.

    single-job_listing.php in your theme directory. Not content-single-job_listing.php in the plugin directory.

    Revert your changes to the plugin's template files. That will likely break things.

  9. segsy
    Member
    Posted 1 month ago #

    Hello everyone, I have a similar challenge i use a main sidebar widget for a video to play on all the pages,of course the video is being fetch from another Url. But now i create a page that will contain a special video which i do not want the other video on the main side bar to be on this page. All i wanted is i do not want to have two video playing at the same time, and so all i want is to disable the video widget on the main side bar on this particular page but at the same time,i need this video on main sidebar to appear on the other pages. Does anyone have idea or solution on how i can solve this problem. Your point or solution will be much appreciated. Thank you....

  10. segsy
    Member
    Posted 1 month ago #

  11. esmi
    Forum Moderator
    Posted 1 month ago #

    @segsy: If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else's topic.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags