How to have Social Media Share Buttons on Landing Page only

Community Forums Forums General Discussion How to have Social Media Share Buttons on Landing Page only

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  LynneM 1 year, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #51908

    LynneM
    Participant
    Post count: 2

    I would like to have the Shareaholic Share buttons on a landing page that I’m creating but don’t want them on all pages. They are currently working for all blog posts which is perfect, now I just need them added to a new landing page I’m creating.

    Can someone instruct me on how to achieve this?

    #51922

    braddalton
    Participant
    Post count: 9232

    Try this in your child themes functions.php file

    You may need to tweak the conditional tag for page templates and change the hook position which uses the old XHTML hooks.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #51923

    braddalton
    Participant
    Post count: 9232

    Or you could also use the page i.d for one landing page so change this line of code:
    [php]
    if (is_page_template(‘page_landing.php’) && function_exists(‘selfserv_shareaholic’)) {
    [/php]

    To this:

    [php]
    if (is_page(007) && function_exists(‘selfserv_shareaholic’)) {
    [/php]

    Or this:

    [php]
    if (is_page(‘landing-page-slug’) && function_exists(‘selfserv_shareaholic’)) {
    [/php]

    Note: If you would like to insert the menu manually, simply choose “Manual Mode” from the options page, then place the above code into your child themes functions.php file.

    Source: Shareaholic plugin installation instructions.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #51926

    LynneM
    Participant
    Post count: 2

    Thanks so much. Will give these a shot. I’m also working on getting rid of the error message under the Facebook comment box that says that the page is unreachable. aarrrgghhh. :)

    #51927

    LynneM
    Participant
    Post count: 2

    I ran it through FB debugger and got rid of the “unreachable” error message. Whew! For anyone else that is having this problem, here is the link for that:

    https://developers.facebook.com/tools/debug

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.