• Resolved mrehman

    (@mrehman)


    Dear Team,

    I’m using WP ALL IMPORT PRO (WPAI) with WP Job Manager (WPJM) for my job board website. My jobs are automatically submitted to Google Jobs after they are uploaded via WPAI as this is a default feature of WPJM. Now, I have a compulsory requirement from my partner website and they do not want their jobs to be submitted to Google Jobs.

    WPJM provides a permanent solution by editing theme’s function.php file with below code.

    Disable Structured Data
    The code below can be inserted into your theme’s functions.php file to disable the Job schema. Even better, you can use a plugin like Code Snippets rather than adding it directly to functions.php:
    add_filter( ‘wpjm_get_job_listing_structured_data’, ‘__return_false’ );

    By doing this, it will disable this feature for all jobs whereas my requirement is to apply above code only for a certain import via WPAI. Is there any solution to achieve this by using any option or custom fields etc.

    Regards
    M.Rehman

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mrehman

    (@mrehman)

    I got partial solution from dev. It works well if condition false is returned. But if yes condition is met then google structured data get errors. Is there any way to remove filter incase of true condition?

    add_filter( ‘wpjm_get_job_listing_structured_data’, ‘my_set_google’, 10, 2 );

    function my_set_google( $data, $post ) {
    $google = get_post_meta( $post->ID, ‘_add_to_google’, true );

    return ( $google == ‘no’ ) ? false : true;
    }

    Plugin Support bindlegirl (a11n)

    (@bindlegirl)

    Hi @mrehman !

    Unfortunately, we can’t help with code customizations. Maybe someone else here will have a suggestion for you.

    Plugin Support Jay

    (@bluejay77)

    Hi there,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Disable Structured Data’ is closed to new replies.