New Landing How can we help? Themeforest Theme Support Flexform Including Social Sharing Options on Custom Pages

Viewing 7 posts - 1 through 7 (of 7 total)
  • Posted in: Flexform
  • #11655
    Barry Laminack
    Member
    Post count: 31

    I created a page in my child theme page-mypage.php

    I’d like to add the sharing options to it. I included

    $show_social = "1";

    at the top of the page and then added the following:

    <?php if ($show_social) { ?>
    <div class="share-links clearfix">
    <div class="share-text">Share:</div>
    <div class="share-buttons">
    <span class='st_facebook_hcount' displayText='Facebook'></span>
    <span class='st_twitter_hcount' displayText='Tweet'></span>
    <span class='st_googleplus_hcount' displayText='Google +'></span>
    <span class='st_linkedin_hcount' displayText='LinkedIn'></span>
    <span class='st_pinterest_hcount' displayText='Pinterest'></span>
    </div>
    "><i class="icon-link"></i>
    &body=<?php the_permalink(); ?>" title="Share by Email"><i class="icon-envelope-alt"></i>
    </div>
    <?php } ?>

    The only thing I get is the link and email options. Any clue what I’m missing?

    Screen shot attached.

    #11751
    Ben – SUPPORT
    Member
    Post count: 690

    Have you assigned your social accounts on theme options?

    Thanks
    Ben

    #11810
    Barry Laminack
    Member
    Post count: 31

    Hi Ben

    Yes. The social icons are working on regular posts, just not on this custom page.

    #11894
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi Barry,

    The pages don’t have this option, so calling it would do nothing.

    Try keeping only the div with the share links and remove these lines that condition it:

    $show_social = "1";
    <?php if ($show_social) { ?>

    and finally:

    <?php } ?>

    Regards,
    ————————————————————————————————————

    Cosmin – Support

    #11967
    Barry Laminack
    Member
    Post count: 31

    That was it Cosmin. As always, thanks, you guys rock!

    #11972
    Barry Laminack
    Member
    Post count: 31

    Shoot, one more question. Is it possible to enable them on custom pages? I got it working on my custom post types, but need them on my custom pages as well. Thanks!

    #12058
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi Barry,

    Well, you can add that block of code to your custom page templates, if that’s what you’re asking. Just make sure to include it properly so things don’t overlap or generate invalid HTML 🙂

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register