mardi 4 mars 2014

Worpress Post Excerpt in a Slider


Vote count:

0




I want to create a slider but i can't get the post excerpt working. The title and permalink are working but the excerpt won't show... here is my code:


$categories, 'post_type' => 'post', 'posts_per_page' => $amount, ); // Our incrementing counter, leave this set to 0 $counter = 0; // Query the posts based off of the parameters in the $args variable $bs_posts = new WP_Query( $args ); // Our calculated limit of how many posts we have to work with, don't change this $bs_posts_limit = count( $bs_posts->posts ) - 1; // How many posts to display in each slide of the SlideDeck $per_page = !empty($this->options['per-slide']) ? $this->options['per-slide'] : '2'; // Add "active" class to 1st slider item $j=1; // Carousel/Slider Html echo "$taboptions['id']) ? ' id="slider-' . trim($thesis->api->esc($this->options['id'])) . '"' : '') . ' class="carousel slide'. (!empty($this->options['c-type']) ? ' ' . trim($thesis->api->esc($this->options['c-type'])) : '') .''. (!empty($this->options['class']) ? ' ' . trim($thesis->api->esc($this->options['class'])) : '') . "\" data-ride=\"carousel\">\n". "$tab". stripslashes($this->options['intro']) ."\n". "$tab\n"; ?> posts as $bs_post ): ?> ID; $bs_post_title = get_the_title( $bs_post_ID ); $bs_post_link = get_permalink( $bs_post_ID ); $bs_post_excerpt = get_the_excerpt( $bs_posts_post_ID ); ?> "> ID )) the_post_thumbnail( 'thumbnail', array( 'title' => "#htmlcaption") ) ?> "> ****** " class="btn btn-default btn-xs" style="float:right;">Read More

<?php $counter++; $j++;?>

<?php endforeach; ?>
<?
echo "$tab</div>\n".
"$tab</div>\n";
?>
<?


asked 57 secs ago






Aucun commentaire:

Enregistrer un commentaire