• Resolved lukefive

    (@lukefive)


    I added a new “Region” field to my client’s database. The following PHP displays that but only in the WordPress admin area. My efforts to display Region on a public page all fail silently. Tried creating a shortcode but also silent failure.

    add_action( 'single_job_listing_meta_end', 'display_job_region_data' );
    function display_job_region_data() {
      global $post;
      $region = get_post_meta( $post->ID, '_job_region', true );
      if ( $region ) {
        echo '<li>' . __( 'Region: ' ) . esc_html( $region ) . '</li>';
      }
    }
    

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Outputting new field for public view’ is closed to new replies.