New Landing How can we help? Themeforest Theme Support Flexform Add "share line" to pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Flexform
  • #4478
    esucces
    Member
    Post count: 80

    Hi there

    The nice Share line that is seen on the end of blog posts – is it possible to have that line on pages also?

    /Jan

    #4526
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi Jan,

    You would need to copy the code from single.php (lines 314-325) into page.php

    Regards,

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

    Cosmin
    Support Assistant

    #4544
    esucces
    Member
    Post count: 80

    Hi Cosmin

    Thanks for the feedback.

    Can’t get this to work. If I copy this

    <code>

    <div class=”share-links clearfix”>

    <div class=”share-text”><?php _e(“Share:”, “swiftframework”); ?></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>

    <a class=”permalink item-link” href=”<?php the_permalink(); ?>”><i class=”icon-link”></i></a>

    <a class=”email-link item-link” href=”mailto:?subject=<?php the_title(); ?>&amp;body=<?php the_permalink(); ?>” title=”Share by Email”><i class=”icon-envelope-alt”></i></a>

    </div>

     

    <?php } ?>
    </code>

    To page.php, nothing shows up.

    I also copied the line “$show_social = get_post_meta($post->ID, ‘sf_social_sharing’, true);” to the top of the page.

    Hope you can help me further, that would be great.

    Best regards,
    Jan

     

     

    #4621
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi Jan,

    Where in page.php are you copying that code?

    Regards,

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

    Cosmin
    Support Assistant

    #4629
    esucces
    Member
    Post count: 80

    I tried several places, but I believe it should be placed just before these lines:

    <?php } ?>
    <!– CLOSE page –>

    If I remove the <?php if ($show_social) { ?> line, the Share: text is there and the permalink + e-mail link also.

    Thanks,
    Jan

    #4806
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Ah, yes, remove the conditional, as that checks if the post has the “include social sharing” option turned on and this does not exist for pages.

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

    Cosmin
    Support Assistant

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

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

License required for the following item
Login and Registration Log in · Register