Title: dps-template
Last modified: February 1, 2019

---

# dps-template

 *  Resolved [mikec09](https://wordpress.org/support/users/mikec09/)
 * (@mikec09)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dps-template/)
 * Hello, I’m setting up a template and followed your tutorial, maybe I missed something
   though. The output is quite different from the template. Example: the href is
   outside of the tag as well as others.
 * this is what I’m using:
    ` <?php echo '<div id="post-' . the_ID() . '" class="
   webinar-wrap2">'; echo '<div class="alignleft webinar-block">[<div class="webinar-top">'; echo '<span class="webinar-cat">' . $term->name . '</span><span class="h2textblock">' . the_title() .'</span></div>'; echo '<div class="webinar-bot"><span class="webinar-title">' . the_excerpt() . '</span>'; echo '[<button class="btn btn-webinar" type="button">View Webinar</button>](https://wordpress.org/support/topic/dps-template/&apos; . the_permalink() . &apos;?output_format=md)'; echo'
   </div></div></div>'; ?>
 * and this is the output:
    ` <div id="post-" class="webinar-wrap2">/standards-webinars/
   guidance-for-improving-color-quality/ <div class="alignleft webinar-block"> <
   div class="webinar-top">Guidance for Improving Color Quality<span class="webinar-
   cat"></span><span class="h2textblock"></span></div> <p>Recorded June 14, 2018
   </p> [Read More](https://wordpress.org/standards-webinars/guidance-for-improving-color-quality/?output_format=md)
   <div class="webinar-bot"><span class="webinar-title"></span>/standards-webinars/
   guidance-for-improving-color-quality/ <button class="btn btn-large btn-webinar
   btn-noline" type="button">View Webinar</button> </div></div></div>
 * any help is appreciated.

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

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dps-template/#post-11160501)
 * I believe part of your issue comes from using incorrect WordPress functions:
   –`
   the_ID()` echoes the ID. You should be using `get_the_ID()` in that context –`
   the_title()` should be `get_the_title()` – `the_excerpt()` should be `get_the_excerpt()`–
   I’m not seeing the link, but I assume you’re using `the_permalink()` when you
   should be using `get_the_permalink()`
 *  Thread Starter [mikec09](https://wordpress.org/support/users/mikec09/)
 * (@mikec09)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dps-template/#post-11161170)
 * Thanks, I tried using the functions by using ‘get_the…’ but they all returned
   empty. what ended up working was the following:
 * <div id=”post-<?php the_ID(); ?>” class=”webinar-wrap2″>
    <div class=”alignleft
   webinar-block”> <div class=”webinar-top”> <span class=”webinar-cat”><?php $category
   = get_the_category(); echo $category[0]->cat_name; ?></span> [a href=”<?php the_permalink();?
   >”><span class=”h2textblock”><?php the_title(); ?></span> </div> <div class=”
   webinar-bot”> <span class=”webinar-title”> <?php the_excerpt(); ?></span> [a 
   href=”<?php the_permalink(); ?>”><button class=”btn btn-large btn-webinar btn-
   noline” type=”button”>View Webinar</button> </div> </div> </div>
 * Not sure the difference but it works. In any case this plugin is a great resource.
    -  This reply was modified 7 years, 4 months ago by [mikec09](https://wordpress.org/support/users/mikec09/).

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

The topic ‘dps-template’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mikec09](https://wordpress.org/support/users/mikec09/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/dps-template/#post-11161170)
 * Status: resolved