Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter Matt Peskett

    (@djmathu)

    OK I’ve created a partial solution of sorts to display salary inside WP Job Manager results (but still no joy with a drop down filter).

    For the simple salary display bit just replicate the hook and function of displaying salary in a single post (as per the tutorial), but rename the Meta and increment the function so as not to cause a conflict. Adds salary beneath the job type and days posted values which works for me:

    /*
     *  add salary field to WP Job Manager post listings
     */
    
    add_action( 'job_listing_meta_end', 'display_job_salary_data2' );</p>
    <p>function display_job_salary_data2() {<br />
      global $post;</p>
    <p>  $salary = get_post_meta( $post->ID, '_job_salary', true );</p>
    <p>  if ( $salary ) {<br />
        echo '</p>
    <li>' . __( 'Salary:' ) . ' ?£' . esc_html( $salary ) . '</li>
    <p>';<br />
      }<br />
    }<br />

    Has anybody actually got this to work? All I got after dropping into plugins and clicking activate was a fatal error:

    WordPress database error: [Table ‘ftblog.wp_leaguemanager_leagues’ doesn’t exist]
    SELECT title, id FROM wp_leaguemanager_leagues WHERE active = 1 ORDER BY id ASC

    Did you ever get a solution on this? I’m trying to do the exact same thing – same blog two templates linked from a home page?

Viewing 3 replies - 16 through 18 (of 18 total)