Support » Plugin: WP Job Manager » Page permalinks beneath WP Job Manager directory create 404s

  • Resolved kiaseven

    (@kiaseven)


    Hi,

    I have set up a jobs board here: atlasandboots.com/remote-jobs/.

    The individual job pages work as expected. My problem is that I need to create some normal WP pages under the /remote-jobs/ directory. When I create and preview these, they look fine but once I publish, they lead to a 404. (Example: atlasandboots.com/remote-jobs/submit-remote-job is a published page but leads to a 404).

    Note: I have used the steps here to rewrite ‘job’ to ‘remote-jobs’ but I don’t think this is the issue because it happens even without the rewrite. I have resaved Permalinks.

    Any help would be gratefully received.

    Thank you,

    Kia

    • This topic was modified 2 years, 5 months ago by kiaseven.
    • This topic was modified 2 years, 5 months ago by kiaseven.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jonryan

    (@jonryan)

    Hi @kiaseven how are you creating the /remote-jobs/ directory that you are putting that page under? Does the page load if you disable WPJM?

    Hi Jon,

    Thank you for looking at this. I created a page called ‘Remote Jobs’ in the WP backend with the URL /remote-jobs/. Then I created a page called ‘Submit a remote job’ and chose ‘Remote Jobs’ as the parent page in the WP backend. The URL for the child page is atlasandboots.com/remote-jobs/submit-remote-job.

    The child page loads as expected when WPJM is deactivated.

    As mentioned above, I added the following code to functions.php to make the individual job listings appear after /remote-jobs/. I thought this might be messing up the child page but if I a) leave the code as is in functions.php and b) deactivate WPJM, the child page works as expected so I don’t think it’s that? I also tried switching my theme to Twenty Sixteen and Twenty Seventeen and still had the problem.

    function change_job_listing_slug( $args ) {
      $args['rewrite']['slug'] = _x( 'remote-jobs', 'Job permalink - resave permalinks after changing this', 'job_manager' );
      return $args;
    }
    
    add_filter( 'register_post_type_job_listing', 'change_job_listing_slug' );

    Any help would be much appreciated.

    Thank you,

    Kia

    • This reply was modified 2 years, 5 months ago by kiaseven.

    Hi Jon,

    Just to let you know, I have deactivated WPJM and am now using Content Views to display the jobs listings.

    Ideally, I’d like to use WPJM so if you do find a solution to the above, please let me know. Otherwise, I guess I’ll have to stick to Content Views.

    Thanks,
    Kia

    Plugin Author jonryan

    (@jonryan)

    @kiaseven did you figure this out sorry this got lost in all the responses here? I was able to recreate the issue.

    The problem is that afaik you cannot setup a permalink like you have for a CPT but also have that be the same name as a page, meaning you can have a page named remote-jobs, and have the CPTs in that directory, but you can’t have child pages. There isn’t any SEO advantage of having these under the same directory, so you should just use remote-jobs for the search and child pages and use remote-job for the CPTs.

    kiaseven

    (@kiaseven)

    Hi Jon,

    I didn’t figure it out, so thanks for following up.

    Kia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page permalinks beneath WP Job Manager directory create 404s’ is closed to new replies.