Title: Using PHP code in template
Last modified: August 24, 2016

---

# Using PHP code in template

 *  Resolved [houfton](https://wordpress.org/support/users/houfton/)
 * (@houfton)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/)
 * I am trying to use the <?php DISPLAY_ULTIMATE_PLUS(); ?> snippet in one of my
   child theme templates but nothing is showing. For instance on[ this page](http://2knoyle.co.uk/portfolio-item/angela-evans/).
 * The template code is
 *     ```
       <?php get_header(); ?>
   
       <?php get_template_part('element', 'page-header'); ?>
   
       	<section id="content" class="content content-wide">
       		<?php if(have_posts()) while(have_posts()): the_post(); ?>
       		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       			<div class="portfolio-image">
       				<?php the_post_thumbnail(); ?>
       			</div>
       			<div class="portfolio-content">
       				<?php the_content(); ?>
       			</div>
       			<?php DISPLAY_ULTIMATE_PLUS(); ?>
       			<div class="clear"></div>
       		</div>
       		<?php endwhile; ?>
       	</section>
   
       <?php get_footer(); ?>
       ```
   
 * What am I doing wrong?
 * [https://wordpress.org/plugins/ultimate-social-media-plus/](https://wordpress.org/plugins/ultimate-social-media-plus/)

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

 *  Thread Starter [houfton](https://wordpress.org/support/users/houfton/)
 * (@houfton)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078197)
 * The shortcode is working on [this page](http://2knoyle.co.uk/demonstrations/).
 * I do have another widget showing social icons at the moment in the footer in 
   case you are confused! I want the – page specific – icons to appear at the bottom
   of the content as with my second link.
 *  [socialdude](https://wordpress.org/support/users/socialdude/)
 * (@socialdude)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078216)
 * Thank you Houfton, let us have a look at this.
 *  [socialdude](https://wordpress.org/support/users/socialdude/)
 * (@socialdude)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078262)
 * Response from developers:
 * “Functions always return a value so the user should echo the plugin output function
   like this: <?php echo DISPLAY_ULTIMATE_PLUS(); ?>
    “
 * Does that fix it?
 *  Thread Starter [houfton](https://wordpress.org/support/users/houfton/)
 * (@houfton)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078266)
 * That does it, thanks. I should have tried that…
 * (Don’t forget to amend the snippet in the text on your “Where shall they be displayed?…
   Place them manually” section.)
 * I feel a donation coming on…
 *  [socialdude](https://wordpress.org/support/users/socialdude/)
 * (@socialdude)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078268)
 * Will do, and thank you!! 🙂

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

The topic ‘Using PHP code in template’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-social-media-plus/assets/icon-128x128.png?rev=2230338)
 * [Social Share Icons & Social Share Buttons](https://wordpress.org/plugins/ultimate-social-media-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-social-media-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-social-media-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-social-media-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-social-media-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-social-media-plus/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [socialdude](https://wordpress.org/support/users/socialdude/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/using-php-code-in-template/#post-6078268)
 * Status: resolved