Jobs description length is too short

I'm using Jobs & Experts plugin and I want to change the description length that is shown when using the following shortcode: [jbp-job-archive-page]

  • Adam Czajczyk

    Hello Wallace

    I hope you're well today and thank you for your question!

    The plugin is attempting to set the description excerpt length in a way that it would fit inside the "box" on a page but you can tweak that length with an additional code by hooking to "jbp_job_list_content" filter like this:

    <?php
    function my_jbp_job_exterpt($trimmed_content, $content, $charlength) {
    
    	$charlength = 90; // the number here means the character lenght of the description
    	$trimmed_content = wp_trim_words( $content, $charlength );
    	return $trimmed_content;	
    
    }
    add_filter( 'jbp_job_list_content', 'my_jbp_job_exterpt', 10, 3);

    To apply that to your site:

    - create an empty file with a .php extension (e.g. my-job-desc-excerpt.php)
    - copy & paste code from above into that file, using some "clean text" editor (such as e.g. Notepad++, Sublime, cPanel File Manager's editor etc)
    - save the file and upload it to the "/wp-content/mu-plugins" folder of your site's WordPress install; if there's no "mu-plugins" folder inside "wp-content", just create an empty one.

    In this line of the code

    $charlength = 90; // the number here means the character lenght of the description

    you can set the length of the description text (in characters number), here I set it to 90 characters.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.