• Resolved chrisblues

    (@chrisblues)


    Hi there!

    I hope I’ve hit the right forum for this. My apologies if not!

    WP job manager : Version 1.32.3
    running on WordPress 5.1.1 (I know it should be updated, but I’m not in charge of that)

    I’m trying to get the Google Jobs right. The google console complains about the field hiringOrganisation.name being empty. And looking at the generated output, it’s true! Here’s what WP-Job-Manager puts out: (I shortened it to the relevant section)

    "hiringOrganization":
        {
            "@type":"Organization",
            "name":""
        },

    You can see the full output at the bottom of the HTML of the linked page.

    Since it will never change all over the page, I thought, maybe I can just set this property somewhere. But haven’t had much success finding the right spot.

    Where can I set that variable? The plugin’s settings page doesn’t show any fields, that might be related. The job’s settings also have no corresponding field.

    I guess I’m missing the obvious here, since I seem to be the first to stumble upon that…

    Other than that, the plugin runs nicely and does, what it’s supposed to. :o)

    Well, thanks in advance for any pointers you people may have!

    Cheers
    chris

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

Viewing 15 replies - 1 through 15 (of 28 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi! The “hiring organization” is the company name; this field is part of the standard front-end job submission form. If you are filling out jobs from wp-admin, then make sure to take a look here:

    https://wpjobmanager.com/document/adding-jobs-via-admin/

    and fill in the “Company name” field. That should solve the issue for you. ??

    Thread Starter chrisblues

    (@chrisblues)

    Ah, that explains that. Thanks Richard, now I know that I’m not blind! In my instance, this field and some more are missing! See: here

    How could that have happened?

    Oh man, goolge Job API is a tough one. We′ve set this up 3 weeks ago. Took me a whole day to get the api running coorectly. The plugin for that does great work, but is a total mess to set up. But thats related to google

    Where are all your job fields?

    Thread Starter chrisblues

    (@chrisblues)

    Where are all your job fields?

    Yeah, that’s the question. Maybe that’s related to the wp-job-manager addons I have installed? That’s:

    • Job Tags
    • Google Indexing API for WP Job Manager
    • This reply was modified 5 years, 6 months ago by chrisblues.
    • This reply was modified 5 years, 6 months ago by chrisblues.

    Nope, this ain′t related to them. Google Indexing is running on our system as well, and we have all the field like. Do you see anything in your dev console, like something is overritten? How does your template look like?

    Thread Starter chrisblues

    (@chrisblues)

    I’m not sure, I understand you correctly. I see nothing in the web-console of Firefox. Did you mean that? In WP I can’t find no console.

    Which template do you mean? The one in the admin page? I never touched that.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    @chrisblues Huh, that’s odd that you’re missing more fields! They should be there! What WPJM add-ons do you have? Are you using https://plugins.smyl.es/wp-job-manager-field-editor/ ? Is it possible that you removed the Company field, either with that plugin or through a code snippet?

    Thread Starter chrisblues

    (@chrisblues)

    I have ‘Advanced custom fields’ but no ‘WP Job Manager Field Editor’. As far as I can tell, I only have the 2 before mentioned addons related to WPJM.

    • Job Tags
    • Google Indexing API for WP Job Manager

    If I have removed the fields, I certainly am not aware how! Actually I really have done nothing special up onto here. I have some jobs in the list (these were added by some other department), and I added the WP_shortCode [jobs] and [jobs location=”foo”]. That’s about it!

    Only thing is, I updated the WPJM plugin before adding the Google addon.

    I have been fiddling with that Google API thing, but after a first glance, I decided to wait with that until everything else runs smoothly.

    It’s really funny, since all the other fields get some values assigned, just the company name is missing. And yet, most of the fields in the admin interface are not showing up.

    Did you make some customization on the templates?

    Thread Starter chrisblues

    (@chrisblues)

    Well, I never touched the templates in wp-content/plugins/wp-job-manager/templates.
    Also there are no overrides in wp-content/themes.

    Which template exactly are we looking for?

    Should be the job-submit.php

    Thread Starter chrisblues

    (@chrisblues)

    Ok. So I think, we’re getting somewhere. I’ve just added a

    <pre><?php print_r($company_fields, true); ?></pre>

    to wp-content/plugins/wp-job-manager/templates/job-submit.php .

    It seems, this file doesn’t get loaded! It never shows any pre sections. Where could I look for other instances?

    Here’s the file in its entirety:

    <?php
    /**
     * Content for job submission (<code>[submit_job_form]</code>) shortcode.
     *
     * This template can be overridden by copying it to yourtheme/job_manager/job-submit.php.
     *
     * @see         https://wpjobmanager.com/document/template-overrides/
     * @author      Automattic
     * @package     WP Job Manager
     * @category    Template
     * @version     1.32.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    
    global $job_manager;
    ?>
    
    <h1>$company_fields</h1><pre><?php print_r($company_fields, true); ?></pre>
    
    <form action="<?php echo esc_url( $action ); ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data">
    
    	<?php
    	if ( isset( $resume_edit ) && $resume_edit ) {
    		printf( '<p><strong>' . esc_html__( "You are editing an existing job. %s", 'wp-job-manager' ) . '</strong></p>', '<a href="?new=1&key=' . esc_attr( $resume_edit ) . '">' . esc_html__( 'Create A New Job', 'wp-job-manager' ) . '</a>' );
    	}
    	?>
    
    	<?php do_action( 'submit_job_form_start' ); ?>
    
    	<?php if ( apply_filters( 'submit_job_form_show_signin', true ) ) : ?>
    
    		<?php get_job_manager_template( 'account-signin.php' ); ?>
    
    	<?php endif; ?>
    
    	<?php if ( job_manager_user_can_post_job() || job_manager_user_can_edit_job( $job_id ) ) : ?>
    
    		<!-- Job Information Fields -->
    		<?php do_action( 'submit_job_form_job_fields_start' ); ?>
    
    		<?php foreach ( $job_fields as $key => $field ) : ?>
    			<fieldset class="fieldset-<?php echo esc_attr( $key ); ?>">
    				<label for="<?php echo esc_attr( $key ); ?>"><?php echo wp_kses_post( $field['label'] ) . wp_kses_post( apply_filters( 'submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ) ); ?></label>
    				<div class="field <?php echo $field['required'] ? 'required-field' : ''; ?>">
    					<?php get_job_manager_template( 'form-fields/' . $field['type'] . '-field.php', array( 'key' => $key, 'field' => $field ) ); ?>
    				</div>
    			</fieldset>
    		<?php endforeach; ?>
    
    		<?php do_action( 'submit_job_form_job_fields_end' ); ?>
    
    		<!-- Company Information Fields -->
    		<?php if ( $company_fields ) : ?>
    			<h2><?php esc_html_e( 'Company Details', 'wp-job-manager' ); ?></h2>
    
    			<?php do_action( 'submit_job_form_company_fields_start' ); ?>
    
    			<?php foreach ( $company_fields as $key => $field ) : ?>
    				<fieldset class="fieldset-<?php echo esc_attr( $key ); ?>">
    					<label for="<?php echo esc_attr( $key ); ?>"><?php echo wp_kses_post( $field['label'] ) . wp_kses_post( apply_filters( 'submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ) ); ?></label>
    					<div class="field <?php echo $field['required'] ? 'required-field' : ''; ?>">
    						<?php get_job_manager_template( 'form-fields/' . $field['type'] . '-field.php', array( 'key' => $key, 'field' => $field ) ); ?>
    					</div>
    				</fieldset>
    			<?php endforeach; ?>
    
    			<?php do_action( 'submit_job_form_company_fields_end' ); ?>
    		<?php endif; ?>
    
    		<?php do_action( 'submit_job_form_end' ); ?>
    
    		<p>
    			<input type="hidden" name="job_manager_form" value="<?php echo esc_attr( $form ); ?>" />
    			<input type="hidden" name="job_id" value="<?php echo esc_attr( $job_id ); ?>" />
    			<input type="hidden" name="step" value="<?php echo esc_attr( $step ); ?>" />
    			<input type="submit" name="submit_job" class="button" value="<?php echo esc_attr( $submit_button_text ); ?>" />
    			<span class="spinner" style="background-image: url(<?php echo esc_url( includes_url( 'images/spinner.gif' ) ); ?>);"></span>
    		</p>
    
    	<?php else : ?>
    
    		<?php do_action( 'submit_job_form_disabled' ); ?>
    
    	<?php endif; ?>
    </form>
    
    • This reply was modified 5 years, 6 months ago by chrisblues.
    • This reply was modified 5 years, 6 months ago by chrisblues.
    • This reply was modified 5 years, 6 months ago by chrisblues.
    Thread Starter chrisblues

    (@chrisblues)

    I just checked the server, there’s only this one file in the installation by the name of job-submit.php :
    wp-content/plugins/wp-job-manager/templates/job-submit.php

    You dont have to do anything with the template to get up running the google jobs api with the plugin, because this takes over the whole thing for you.
    And adding changes to the template should not be done in the “core” files just use
    wp-content/themes/yourtheme/job_manager/job-submit.php
    to cahnge things

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘How to set a field for google scraping: “hiringOrganisation.name”’ is closed to new replies.