• Resolved PCHAmedia

    (@pchamedia)


    Hello, I am trying to make the default slider for Pinboard point to pages with featured images rather than posts. The site I am building is for a business and not necessarily a blogroll. Here is the default .php for the slider. what is the best way to manipulate this to work with pages instead of blog posts?

    <?php if( ! empty( $sticky ) ) : ?>
    	<?php $slider = new WP_Query( array( 'post__in' => $sticky, 'ignore_sticky_posts' => 1, 'posts_per_post' => 99 ) ); ?>
    	<?php if( $slider->have_posts() ) : ?>
    		<section id="slider">
    			<ul class="slides">
    				<?php while( $slider->have_posts() ) : $slider->the_post(); ?>
    					<li>
    						<article class="post hentry">
    							<?php if( has_post_format( 'video' ) ) : ?>
    								<?php pinboard_post_video(); ?>
    							<?php else : ?>
    								<?php if( has_post_thumbnail() ) : ?>
    									<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
    										<?php the_post_thumbnail( 'slider-thumb' ); ?>
    									</a>
    								<?php endif; ?>
    								<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    							<?php endif; ?>
    							<div class="clear"></div>
    						</article><!-- .post -->
    					</li>
    				<?php endwhile; ?>
    			</ul>
    			<div class="clear"></div>
    		</section><!-- #slider -->
    		<?php wp_reset_postdata(); ?>
    	<?php endif; ?>
    <?php endif; ?>

    For example, instead of clicking an image and being brought to “post 3,” I would like to be brought to the contact page (the same one that appears in the menu). Is there an easy way to do this, or would it be best to deactivate the default slider and install a plugin?

    Here is a link to the site:
    https://test.mgalf.com/wp/

    Thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter PCHAmedia

    (@pchamedia)

    I ended up switching to Biancaa theme and building out with PageBuilder by SiteOrigin. Works much better than coding.

Viewing 1 replies (of 1 total)
  • The topic ‘Pinboard slider for pages, not posts’ is closed to new replies.