Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author micropat

    (@micropat)

    You can AddToAny events to modify the shared title when Twitter is used, for example:

    a2a_config.callbacks.push({
        share: function(data) {
            if (data.service === 'Twitter') {
                var hashtitle = " " + data.title;
                hashtitle = hashtitle.replace(/[ ]+/g, " #");
                return { title: hashtitle };
            }
        }
    });
    Thread Starter dsuescun

    (@dsuescun)

    Awesome!!! that works great ??

    Another question the same topic:
    How can i pull more info from the post to add to the share text?

    I’m using a job board theme, and the job postings have a job title and company, I need to add the company to the shared text, but I don’t know how to extract it.

    I know the theme’s template uses this to call it on the php template:

    <?php
    wp_enqueue_style(‘careerfy-job-detail-two’);
    wp_enqueue_script(‘careerfy-countdown’);
    wp_enqueue_script(‘jobsearch-addthis’);
    global $post, $jobsearch_plugin_options;
    $job_id = $post->ID;

    $job_employer_id = get_post_meta($post->ID, ‘jobsearch_field_job_posted_by’, true); // get job employer
    wp_enqueue_script(‘jobsearch-job-functions-script’);
    .
    .
    .
    $company_name = jobsearch_job_get_company_name($post_id, ”);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need to modify the title to share’ is closed to new replies.