WordPress.org

Forums

WP Job Manager
[resolved] How can I add comments to each job listing (7 posts)

  1. ruralinfo
    Member
    Posted 1 year ago #

    Hello I saw that the theme removes the comments from the job listing.. Is there a way to turn them back on? Thanks

    http://wordpress.org/plugins/wp-job-manager/

  2. Mike Jolley
    Member
    Plugin Author

    Posted 1 year ago #

    This code in functions.php will enable comments:

    add_filter( 'register_post_type_job_listing', 'custom_register_post_type_job_listing' );
    
    function custom_register_post_type_job_listing( $args ) {
      $args['supports'][] = 'comments';
      return $args;
    }

    Creating a job currently posts jobs with comments closed - I will add a filter in the next update to get around this, so as of version 1.2.1 you'll be able to use:

    add_filter( 'submit_job_form_save_job_data', 'custom_submit_job_form_save_job_data' );
    
    function custom_submit_job_form_save_job_data( $args ) {
      $args['comment_status'] = 'open';
      return $args;
    }

    Until then, after the first change, you can enable comments by editing the job itself.

  3. ruralinfo
    Member
    Posted 1 year ago #

    Thank you Mike, worked perfect.. Excellent plugin!!

  4. priamos
    Member
    Posted 1 year ago #

    hi mike thank you for that, can you explain how to enable short codes in job listing pages :))

    thank youu

  5. gbenatov
    Member
    Posted 1 year ago #

    Hi, Please clearify where to paste the code above. It doesnt work for me yet.

  6. gbenatov
    Member
    Posted 1 year ago #

    can I make it automatically to add comments? can they be visiable only to the owner of the job list?

  7. Mike Jolley
    Member
    Plugin Author

    Posted 1 year ago #

    The functions go in theme functions.php. Any changes to comment visibility would need to be done via your theme template files.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Job Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.