• Resolved maggifreddy

    (@maggifreddy)


    Two questions:

    1. How can I limit the number of job listings on the page? The standard seems to be 15 but I’m thinking of making it 10.

    2. How can I put ads in between specific job listings? For example, I’m using AdPlugg and would like to show an ad between job listing nr. 1 & 2. The ‘ad zones’ are created and managed with php-snipptes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter maggifreddy

    (@maggifreddy)

    I found the answer to Q1 further down. Still struggling with the second one though.

    Hi @maggifreddy,

    To drop AdPlugg ads between the job listings, you can make a custom template file for your theme that customizes the appearance of the Simple Job Boards plugin. Then you drop an AdPlugg Ad Tag into the custom theme file.

    Here’s how to do it:

    1. Copy the wp-content/plugins/simple-job-board/templates/content-job-listing-list-view.php file to wp-content/themes/<yourtheme>/simple_job_board/content-job-listing-list-view.php. Simple Job Boards will see this file and use it instead of the default one.
    2. Drop an AdPlugg ad tag right after the closing </article> tag (should be near line 99 of the template file). See the link above for more info about ad tags and how they work.

    Collin Krawll
    AdPlugg

    Thread Starter maggifreddy

    (@maggifreddy)

    Hi Collin,

    Won’t this put the ad in between every ad?

    I only want the ad to show between listing 1 & 2, or between the search bar and the first listing.

    Magnus

    Plugin Author PressTigers

    (@presstigers)

    Magnus,

    If you know the usage of WP hooks then “sjb_job_listing_before” action hook is available in SJB. Please use this hook and this will show ad between the first job and search filter.

    Thank you for using SJB! Let us know if we can help you further.

    Thanks & Regards,
    PressTigers

    Hi Magnus,

    If you know how to use WordPress hooks, @presstigers suggestion is the cleanest.

    If you want to go the theming route these two solutions should work:

    Ad After the Search Filter

    To place an ad right after the search filter, you can use the job-filters.php template file instead of the content-job-listing-list-view.php. Again you would just drop the ad tag in after the closing </article> tag.

    Ad between first two Jobs

    If you want the ad between the first two ads you could set a count variable (I wasn’t able to find a counter that was available from SJB, so in this snippet, I’ve created my own). This would go in the same place as I originally suggested (approx line 99 content-job-listing-list-view.php) but in this scenario, I’ve set a counter and wrapped the ad tag in an if statement.

    
    <?php 
    global $my_job_counter;
    $my_job_counter = ( isset( $my_job_counter) ) ? $my_job_counter + 1 : 1;
    if( $my_job_counter == 1 ) { ?>
        <div class="adplugg-tag" data-adplugg-zone="my_in_btn_jobs_zone"></div>
    <?php } ?>
    

    You could employ a similar counter type solution using hooks as well.

    Best,

    Collin Krawll
    AdPlugg

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Job board list view’ is closed to new replies.