• Resolved imborx

    (@imborx)


    Hi, I activate the wp post manager categories and I set a couple of them. So now I see in the searchbar a dropdown to select them. That’s totally fine.

    My problem is that I can’t see the category in the job list page or in the single job page. How can I show the category as any other meta element?

    Thanks a lot!

Viewing 7 replies - 1 through 7 (of 7 total)
  • hello and good day dear imborx

    first of all: many thanks for using wp-jobmanager – a warm wellcome to you in the community of wp-job-manager!

    Many thanks stepping up with your question: i just installed the wp-job-manager to a new site – so i also wonder why i do not see the according category field.

    i have had a quick view onto the demo-page which is set up by the developers and the support team of the developers of wp-job-manager: see here
    https://demo.wpjobmanager.com/jobs/

    well – in fact i do not see the categories over there. Do you.

    but i am pretty sure that this is only a little thing that has to do with the configuration: i will try to figure it out later the day – and if i will find a solution i will come back ans share it with you (and the community)

    perhaps other user will step up the plate and come back with a solution.

    meanwhile – have a great day.
    regards

    Thread Starter imborx

    (@imborx)

    Hi @say_hello,

    I really appreciate your help. If you find a solution, you will be my hero!

    I checked this tutorial: https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/ which can help us, so I tried to use this code:

    add_action( 'single_job_listing_meta_end', 'display_job_category_data' );

    Bud didn’t worked for me… the meta key should be “_job_category” for this field.

    Best regards.

    could you try this, it worked for me.

    <?php categorias_en_listing(); ?></li>

    Kind regards.

    • This reply was modified 4 years, 6 months ago by Wally.

    add this code to your funcion.php and use the one that i send before to display category.

    function dm_display_wpjm_single_categories () {
        $terms = wp_get_post_terms( get_the_ID(), 'job_listing_category' );
        if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
    		echo '';
    	}else { 
    			echo ' Whatever you want';
    		}
            foreach ( $terms as $term ) {
                echo ' ' . $term->name . ' ';
            }  
            echo '';
    	}
    
    add_shortcode('list_categories_single', 'dm_display_wpjm_single_categories');
    add_theme_support( 'job-manager-templates' );
    
    function categorias_en_listing () {
        $terms = wp_get_post_terms( get_the_ID(), 'job_listing_category' );
        if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
    		echo '';
    	}else { 
    		echo ' whatever you want ';
    	}
            foreach ( $terms as $term ) {
                echo '' . '<a href="' . esc_url( get_term_link( $term ) ) . '">' . $term->name . '</a>';
            }
            echo '';
        }
    add_shortcode('list_categories_single', 'categorias_en_listing');
    add_theme_support( 'job-manager-templates' );
    • This reply was modified 4 years, 6 months ago by Wally.
    • This reply was modified 4 years, 6 months ago by Wally.

    @imborx

    you have to insert this lines into the content-sigle-job_listing-meta.php and upload the file into

    yourtheme/job_manager/content-single-job_listing-meta.php.

    <li class="job-category <?php echo get_the_job_category() ? sanitize_title( get_the_job_category()->slug ) : ''; ?>"><?php the_job_category(); ?></li>

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi,

    To save space, categories are not output in the job listings page. You’d need to override the content-job_listing.php template file to add the categories there:
    https://wpjobmanager.com/document/template-overrides/

    Best,
    Cena

    The WP Job Manager Field Editor can also help with this–it is an extremely useful plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show Categorie in single job page’ is closed to new replies.