WordPress.org

Ready to get started?Download WordPress

Forums

Help with Featured slider Pioneer Theme (6 posts)

  1. cbrunelli
    Member
    Posted 1 year ago #

    Hi,

    I got the Pioneer WordPress theme. And I need help getting the main page featured slider to work. I was able to get the post to show, however, the images for the post dont show.

    Tks for help!!!

    <!-- BEGIN featured -->
    <div id="featured">
    	<!-- begin slider -->
    	<div class="slider">
    		<?php
    		$tmp_query = $wp_query; $count = 0;
    		query_posts('showposts=3&cat=' . get_cat_ID(dp_settings('featured')));
    		if (have_posts()) :
    		while (have_posts()) : the_post(); $count++;
    		?>
    		<div id="slide<?php echo $count; ?>" class="item">
    			<a class="featuredimg" href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'full', 'alt="' . $post->post_title . '"'); ?></a>
    			<div class="text">
    				<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				<p><?php echo dp_clean($post->post_content, 180); ?> [...]</p>
    			</div>
    		</div>
    		<?php
    		endwhile;
    		endif;
    		$wp_query = $tmp_query;
    		?>
    		<ul>
    			<?php
    			$tmp_query = $wp_query; $count = 0;
    			query_posts('showposts=3&cat=' . get_cat_ID(dp_settings('featured')));
    			if (have_posts()) :
    			while (have_posts()) : the_post(); $count++;
    			?>
    			<li<?php if ($count==1) echo ' class="active"'; ?> id="thumb<?php echo $count; ?>">
    				<a href="#"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a>
    				<a href="#" class="title"><?php the_title(); ?></a>
    				<p><?php echo dp_clean($post->post_content, 80); ?> [...]</p>
    			</li>
    			<?php
    			endwhile;
    			endif;
    			$wp_query = $tmp_query;
    			?>
    		</ul>
    		<div class="hover"></div>
    	</div>
    	<!-- end slider -->
    </div>
    <!-- END featured -->
  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Looks like you are using a commercial theme from ThemeForest? If so, you'll need to contact them for help -- as they provide support for their themes. These forums can't support commercial themes -- as they are not freely available for testing/use.

    http://themeforest.net/item/pioneer-responsive-drag-drop-theme/2196164

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where is that function dp_attachment_image() defined?

    what is the download link of your theme?

  4. cbrunelli
    Member
    Posted 1 year ago #

    Hi alchymyth!

    Here is the link: http://bodegazine.com/free-pioneer-magazine-theme/

    I think the function is defined.

    I have seen many questions about this problem, but I could not see any solution yet.

    Thank you my friend!

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    this is the function:

    # Displays post image attachment (sizes: thumbnail, medium, full)
    function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') {
    	$the_query = new WP_Query(array('p'=>$postid));
    	$the_query->the_post();
    	the_post_thumbnail($size);
    	wp_reset_postdata();
    }

    which is basically a wrapper for 'the_post_thumbnail()'

    do your posts have the 'featured image' ?

  6. cbrunelli
    Member
    Posted 1 year ago #

    Super tks alchymyth!!!!

    I managed to solve the problem! I searched the whole code and found, it was a problem in css, conflict ... now is working. Thank you for your attention!

Topic Closed

This topic has been closed to new replies.

About this Topic