• Resolved nicoleomy

    (@nicoleomy)


    Hello!

    I can’t seem to display the job description in the single-job_listing template page. I referred to the original plugin template page for the code but for some reason its not displaying the job description even though the page loads fine and other items (company name, job title, location) gets displayed.

    Below is my code:

    <!-- START post -->
          <div id="post" class="row">
            <?php the_title('<h1>', '</h1>'); ?>
    
            <div class="small-12 columns">
              <span class="data">
                <ul>
                  <li><?php the_job_type(); ?></li>
                  <li><?php the_job_location(); ?></li>
                  <li>RM5000</li>
                  <li><?php the_time( get_option( 'date_format' ) ); ?></li>
                </ul>
              </span>
              <hr>
              <a href="#"><div class="mail"><small>Email this job</small></div></a>
    
              <section>
    
                <h4><?php the_company_name(); ?></h4>
    	        </a>
    
                <p><em><?php the_company_tagline(); ?></em></p>
                <p><?php echo apply_filters( 'the_job_description', get_the_content() ); ?></p>
    
              </section>
    
              <section>
                <h6>Apply for this job</h6>
                <p>To apply online, send your resumé to <strong>[email protected]</strong>, or click the button below.</p>
    
                <a class="button" href="#">Apply Now</a>
              </section>
    
            </div>
          </div>
          <!-- END post -->

    https://www.ads-software.com/plugins/wp-job-manager/

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

    (@mikejolley)

    get_the_content is there so looks ok. Where are you putting this code?

    Thread Starter nicoleomy

    (@nicoleomy)

    Its in my custom single-job_listing.php page template file in the child theme’s folder.

    Thread Starter nicoleomy

    (@nicoleomy)

    Found a workaround after looking at the content-single-job_listing.php file. I added the $post global variable at the top of my code:

    <?php global $post; ?>

    and used $post->post_content instead to retrieve the post’s content that was entered in the WYSIWYG editor in Add Jobs page in wp-admin

    <?php echo $post->post_content; ?>

    Thanks though, Mike!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to display job description in custom single-job_listing template page’ is closed to new replies.