- This topic has 2 replies, 2 voices, and was last updated 7 years, 4 months ago by Ksmith.
- AuthorPosts
- February 4, 2017 at 12:21 am #1847KsmithParticipant
Hello! First time posting on this forum!
The shortcode on my site is working everywhere but on the slider. Is there a quick fix for this?
Here’s the file code-
template-parts/section-slider.php
`<?php
/**
*
* @package HashOne
*/
?><section id=”hs-home-slider-section”>
<div id=”hs-bx-slider”>
<?php for ($i=1; $i < 4; $i++) {
$hashone_slider_page_id = get_theme_mod( ‘hashone_slider_page’.$i );if($hashone_slider_page_id){
$args = array(
‘page_id’ => absint($hashone_slider_page_id)
);
$query = new WP_Query($args);
if( $query->have_posts() ):
while($query->have_posts()) : $query->the_post();
?>
<div class=”hs-slide”>
<div class=”hs-slide-overlay”></div><?php
if(has_post_thumbnail()){
$hashone_slider_image = wp_get_attachment_image_src(get_post_thumbnail_id(),’full’);
echo ”;
} ?><div class=”hs-slide-caption”>
<div class=”hs-slide-cap-title animated fadeInLeft”>
<span><?php echo esc_html(get_the_title()); ?></span>
</div><div class=”hs-slide-cap-desc animated fadeInRight”>
<?php echo get_the_content(); ?>
</div>
</div>
</div>
<?php
endwhile;
endif;
}
} ?>
</div>
</section>February 5, 2017 at 12:07 pm #1857HashKeymasterHere is the fix. Change the below line
to
February 10, 2017 at 6:31 am #1922KsmithParticipantPerfect! Thank you.
- AuthorPosts
- You must be logged in to reply to this topic.