• Hi All
    I have a custom WordPress plugin which displays job vacanices. There are 2 views to this plugin, the first view shows all of the vacancies and the second view shows just one vacancy.
    I have added the php <?php echo sharing_display(); ?> to the loop which creates the jobs for the first view and for the second view. This bit of php shows the Jetpack social share buttons.
    My issue is that when sharing a vacancy the URL is wrong. The URL that is being shared is http://www.mysite.com/job-search/ when really it should be http://www.mysite.com/job-search/job/306/
    Is there any way to manipulate the php in order to for the share buttons to share the correct URL?
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter designsubway

    (@designsubway)

    ***EDIT***
    Just to let you know; the ‘job/306/’ part of the URL is unique to each job.

    Thread Starter designsubway

    (@designsubway)

    I have been able to manipulate the URL using:

    <?php $share_url = get_permalink().'job/'.$bb_job->id.'/';
    echo str_replace('http://www.mywebsite.com/job-search/', $share_url, sharing_display());
    ?>

    When I view the page and look at the code the URL is correct however when I click on a share button the URL is still http://www.mywebsite.com/job-search/ without the extra bit refering to the job.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Jetpack Share in Custom Plugin’ is closed to new replies.