• Resolved userlearning2015

    (@userlearning2015)


    Hi,
    Im trying to use the PLUGIN on specific parts of my THEME. Not inside the pages, post, header, footer, etc.

    Example:

    <div class="hereclassplug">
    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
        ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => true ) );
    } ?>
    </div>

    What code should I use?

    I also unchecked ALL the options of display on the configuration page of the plugin, because I just want to use it in every page, recognizing TITLE of the current page and URL (and maybe IMAGE for sharing in Facebook, as example) but in the part of my theme that I want.

    Anyone can help me?
    Thanks for your time and for allowing us to use your plugin.

    https://www.ads-software.com/plugins/add-to-any/

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

    (@micropat)

    The example code you posted is exactly what you should use for sharing the current page’s URL & title, and it can go just about anywhere in your theme.

    In the plugin’s FAQ, see the 5th FAQ about Facebook sharing.

    Thread Starter userlearning2015

    (@userlearning2015)

    Can be that I′m using it in localhost with XAMPP?

    I extracted the HTML CODE of the page and found this:

    <div class="paginasnoindex">
    <p>TITLE EXAMPLE</p>
    <p>Praesent rhoncus sem sapien, in laoreet... TEXT EXAMPLE</p>
    <div class="addtoany_share_save_container addtoany_content_bottom"><div class="addtoany_header">Share it</div><div class="a2a_kit a2a_kit_size_32 addtoany_list a2a_target" id="wpa2a_2"><a class="a2a_button_facebook a2a_counter" href="https://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2F127.0.0.1%2Fsite%2Faboutme%2F&linkname=About" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter a2a_counter" href="https://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2F127.0.0.1%2Fsite%2Faboutme%2F&linkname=About" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="https://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2F127.0.0.1%2Fsite%2Faboutme%2F&linkname=About" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd addtoany_share_save" href="https://www.addtoany.com/share_save"></a></div></div></div>

    Can be that…? Or maybe something with CSS?
    I′m trying to find the answer but I can′t.
    Thanks again!

    Plugin Author micropat

    (@micropat)

    Correct, Facebook (and a few other services) cannot reach your local site. They will look for “Open Graph meta tags” on your live site pages only.

    Be sure to read “For Facebook sharing, how can I set the thumbnail image and description Facebook uses?” in the plugin’s FAQ.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Tag or code to use on specific parts of my THEME’ is closed to new replies.