Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Flexform › Custom page templates and social sharing buttons
New Landing › How can we help? › Themeforest Theme Support › Flexform › Custom page templates and social sharing buttons
- This topic has 14 replies, 2 voices, and was last updated 10 years by Mohammad – SUPPORT.
-
Posted in: Flexform
-
May 14, 2014 at 9:02 am #74817
Hi,
I’ve noticed on Flexform you can only set the page template the ‘Default Template’ and I can’t see how to add custom ones.
Is this possible?
The reason I want to know is because I want to add the Social Sharing Links to a few pages so I need to be able to set a different page template.
The code I’m using is:
<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(); ?>&body=<?php the_permalink(); ?>" title="Share by Email"><i class="icon-envelope-alt"></i></a> </div>
However when I use this all I get is the link and email options, any idea?
Thanks, Pete
May 14, 2014 at 2:07 pm #74978Hi,
First copy page.php and rename page-new.php and refer this article to create a page template http://codex.wordpress.org/Page_Templates . After this you can edit page-new.php as you want and this can be used to desired pages .Thanks 🙂
With Best Regards
Swift IdeasMay 14, 2014 at 2:51 pm #75007Hi Mohammad,
Thanks, that sorted it. Forgot to add this to the top of the file:
<?php /* Template Name: My Custom Page */
What about my question about the social share links?
Thanks, Pete
May 14, 2014 at 3:10 pm #75018Hi,
Where do you want to add social code ? Please attach a marked screenshot .Thanks 🙂
With Best Regards
Swift IdeasMay 14, 2014 at 3:36 pm #75035Hi Mohammad,
Just a the end of the page content, see the screen shot.
I’ve also added the template file.
Thanks. Pete
May 14, 2014 at 3:40 pm #75041Sorry I haven’t uploaded the file as it won’t let me but I’m trying to add it after line 116.
Code looks like this:
<!-- OPEN page --> <?php if (($sidebar_config == "left-sidebar") || ($sidebar_config == "right-sidebar")) { ?> <div <?php post_class('clearfix span8'); ?> id="<?php the_ID(); ?>"> <?php } else if ($sidebar_config == "both-sidebars") { ?> <div <?php post_class('clearfix row'); ?> id="<?php the_ID(); ?>"> <?php } else { ?> <div <?php post_class('clearfix'); ?> id="<?php the_ID(); ?>"> <?php } ?> <?php if ($sidebar_config == "both-sidebars") { ?> <div class="page-content span6"> <?php the_content(); ?> </div> <aside class="sidebar left-sidebar span3"> <?php dynamic_sidebar($left_sidebar); ?> </aside> <?php } else { ?> <div class="page-content clearfix"> <?php the_content(); ?> <div class="link-pages"><?php wp_link_pages(); ?></div> </div> <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(); ?>&body=<?php the_permalink(); ?>" title="Share by Email"><i class="icon-envelope-alt"></i></a> </div> <?php if ( comments_open() ) { ?> <div id="comment-area"> <?php comments_template('', true); ?> </div> <?php } ?> <?php } ?> <!-- CLOSE page -->
May 14, 2014 at 4:08 pm #75044Hi,
You can add code after this statement
<div class="link-pages"><?php wp_link_pages(); ?></div>
ThanksMay 14, 2014 at 4:13 pm #75051Hi Mohammad,
Still don’t get any social share buttons showing up.
I’ve added this just after the code you mentioned above:
<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(); ?>&body=<?php the_permalink(); ?>" title="Share by Email"><i class="icon-envelope-alt"></i></a> </div>
May 14, 2014 at 4:17 pm #75053Hi,
Are you using any java script code to display social icons ? Let me know website URL to debug .Thanks 🙂
With Best Regards
Swift IdeasMay 14, 2014 at 4:22 pm #75057Hi Mohammad,
No, the code above is that standard Flexform code. Basically I’m trying to call the same social icons that are used on the blog posts.
Here’s a page where they are meant to be active: http://www.displaywizard.co.uk/display-hub/expert-guide/10-great-reasons-to-exhibit-at-a-trade-show/
May 14, 2014 at 4:24 pm #75059Hi,
Please attach a screenshot that where is social icons displaying ?
Thanks 🙂
With Best Regards
Swift IdeasMay 14, 2014 at 4:26 pm #75060Hi,
It’s where the first screen shot I sent you.
Here’s a link to a blog page where they are displaying correctly: http://www.displaywizard.co.uk/display-hub/gantry-exhibition-systems-buy/
May 14, 2014 at 4:37 pm #75062Hi,
Please add this code also at new template file and let me know your feedback.
<script type='text/javascript' src='http://w.sharethis.com/button/buttons.js' ></script>
Thanks 🙂
With Best Regards
Swift IdeasMay 14, 2014 at 4:41 pm #75064Hi Mohammad,
Thanks, that’s sorted it 🙂
You’re a legend!
Pete
May 14, 2014 at 4:45 pm #75066Hi,
You most welcome . I’m glad that issue resolved .
Thanks 🙂
With Best Regards
Swift Ideas -
Posted in: Flexform
You must be logged in and have valid license to reply to this topic.