Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    You would need to create a template file for each new archive and customise the loop. You can do this by calling our template files per job listing, or outputting the HTML yourself.

    Thread Starter kanagarasu

    (@kanagarasu)

    Do you have any examples?

    Can you please elaborate?

    Plugin Author Mike Jolley

    (@mikejolley)

    Include this file within your post loop: https://github.com/mikejolley/WP-Job-Manager/blob/master/templates/content-job_listing.php Thats our template for a regular job listing in list format.

    Thread Starter kanagarasu

    (@kanagarasu)

    Hey mike,

    Thanks for the help.

    I am using this function to change the template on job category archive, But I can not see any changes. what am I doing wrong?

    Here is the function

    add_filter( ‘template_include’, ‘archive_page_template’, 99 );

    function archive_page_template( $template ) {

    if ( is_post_type_archive(job-category) ) {
    $new_template = locate_template( array( ‘taxonomy-job_listing_category.php’ ) );
    if ( ” != $new_template ) {
    return $new_template ;
    }
    }

    return $template;
    }

    Thanks,
    kanagarasu

    Plugin Author Mike Jolley

    (@mikejolley)

    That doesn’t look like the way to do this.

    What template file do you have for your archives? I would suggest starting with https://codex.www.ads-software.com/Template_Hierarchy#Custom_Taxonomies_display and making a taxonomy-job_listing_category.php

    Thread Starter kanagarasu

    (@kanagarasu)

    Here is the taxonomy-job_listing_category.php

    <?php
    /**
    * post type archive template.
    *
    */

    //* Force full width content layout
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    //* Remove the breadcrumb navigation
    // remove_action( ‘genesis_before_loop’, ‘genesis_do_breadcrumbs’ );

    //* Remove the post info function
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );

    //* Remove the post content
    add_action( ‘genesis_entry_content’, ‘genesis_do_post_content’ );

    //* Remove the post image
    remove_action( ‘genesis_entry_content’, ‘genesis_do_post_image’, 8 );

    //* Add featured image below post title with
    add_action( ‘genesis_entry_header’, ‘sk_portfolio_grid’ );
    function sk_portfolio_grid() {

    <li <?php job_listing_class(); ?> data-longitude=”<?php echo esc_attr( $post->geolocation_lat ); ?>” data-latitude=”<?php echo esc_attr( $post->geolocation_long ); ?>”>
    “>
    <div class=”logo “>
    <?php the_company_logo(); ?></div>
    <div class=”position “>
    <h3><?php the_title(); ?></h3>

    </div>
    <div class=”company”>
    <?php the_company_name( ‘‘, ‘ ‘ ); ?>
    </div>
    <ul class=”meta “>
    <?php do_action( ‘job_listing_meta_start’ ); ?>

    <li class=”job-expire”><?php echo ( $expires = get_post_meta( $post->ID, ‘_job_expires’, true ) ) ? date_i18n( get_option( ‘date_format’ ), strtotime( $expires ) ) : ‘–’; ?>

    <?php do_action( ‘job_listing_meta_end’ ); ?>

    }

    //* Remove the post meta function
    remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );

    //* Modify the length of post excerpts
    add_filter( ‘excerpt_length’, ‘genesis_post_excerpt_length’ );
    function genesis_post_excerpt_length( $length ) {
    return 50; // pull first 50 words
    }

    add_filter( ‘get_the_content_more_link’, ‘child_read_more_link’ );
    function child_read_more_link() { return ”; }

    genesis();

    I can not see any changes. what am I doing wrong?

    Thread Starter kanagarasu

    (@kanagarasu)

    Here is the taxonomy-job_listing_category.php

    <?php
    /**
    * post type archive template.
    *
    */

    //* Force full width content layout
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    //* Remove the breadcrumb navigation
    // remove_action( ‘genesis_before_loop’, ‘genesis_do_breadcrumbs’ );

    //* Remove the post info function
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );

    //* Remove the post content
    add_action( ‘genesis_entry_content’, ‘genesis_do_post_content’ );

    //* Remove the post image
    remove_action( ‘genesis_entry_content’, ‘genesis_do_post_image’, 8 );

    //* Add featured image below post title with
    add_action( ‘genesis_entry_header’, ‘sk_portfolio_grid’ );
    function sk_portfolio_grid() {

    <li <?php job_listing_class(); ?> data-longitude=”<?php echo esc_attr( $post->geolocation_lat ); ?>” data-latitude=”<?php echo esc_attr( $post->geolocation_long ); ?>”>
    “>
    <div class=”logo “>
    <?php the_company_logo(); ?></div>
    <div class=”position “>
    <h3><?php the_title(); ?></h3>

    </div>
    <div class=”company”>
    <?php the_company_name( ‘‘, ‘ ‘ ); ?>
    </div>
    <ul class=”meta “>
    <?php do_action( ‘job_listing_meta_start’ ); ?>

    <li class=”job-expire”><?php echo ( $expires = get_post_meta( $post->ID, ‘_job_expires’, true ) ) ? date_i18n( get_option( ‘date_format’ ), strtotime( $expires ) ) : ‘–’; ?>

    <?php do_action( ‘job_listing_meta_end’ ); ?>

    }

    //* Remove the post meta function
    remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );

    //* Modify the length of post excerpts
    add_filter( ‘excerpt_length’, ‘genesis_post_excerpt_length’ );
    function genesis_post_excerpt_length( $length ) {
    return 50; // pull first 50 words
    }

    add_filter( ‘get_the_content_more_link’, ‘child_read_more_link’ );
    function child_read_more_link() { return ”; }

    genesis();

    Plugin Author Mike Jolley

    (@mikejolley)

    Thread Starter kanagarasu

    (@kanagarasu)

    Hi Mike

    Finally I got it.

    One more question, I want to display related jobs on each post. How can I enable this?

    Plugin Author Mike Jolley

    (@mikejolley)

    We have support for https://www.relatedpostsforwp.com/ for job listings. Worth a try maybe.

    Thread Starter kanagarasu

    (@kanagarasu)

    Hi mike,

    Is there any shortcode for load more listing or pagination for theme template.

    Plugin Author Mike Jolley

    (@mikejolley)

    Not sure what you mean?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to Display Same style job list on category archives?’ is closed to new replies.