WordPress.org

Ready to get started?Download WordPress

Forums

How to change featured content from posts to a certain subapges in parent page? (2 posts)

  1. Urmas
    Member
    Posted 4 years ago #

    Hi!

    It's here: link

    This design has slider content from latest posts. I would like to replace it with content retrieved from subpages under "Products".

    The theme "Ecologic" is available from there: http://www.web2feel.com/ekologic/ if you need to see the code for the blog.

    I believe the feature is read from the file slide.php. It's code is as follows:

    <script type="text/javascript">
    var $jx = jQuery.noConflict();
    $jx(function() {
     $jx(".mygallery").jCarouselLite({
     btnNext: ".next",
            btnPrev: ".prev",
    		visible: 1,
    		easing: "backout",
    	    speed: 1000
        });
    
    });
    </script>
    
    <div id="slidearea">
    
    <div id="gallerycover">
    <div class="mygallery">
    
    	<ul>
    			<?php
    			$gldcat = get_option('eko_gldcat');
    			$gldct = get_option('eko_gldct');
    			$my_query = new WP_Query('category_name='.$gldcat.'&showposts='.$gldct.'');
    			while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
    			?>
        <li>
    	<div class="mytext">
    			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    			<?php if(function_exists('the_content_limit')) { ?>
    			<?php the_content_limit(300);  ?>
    			<?php } else { ?>
    	<?php the_excerpt(); ?>
    			<?php } ?> 
    
    			<?php if ($preview = get_post_meta($post->ID, 'preview', $single = true)) { ?>
    			<img class="slidim" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=web5/<?php echo $preview; ?>&h=180&w=400&zc=1" alt=""/>
    			<?php } else { ?>
    			<img src="<?php bloginfo('template_directory'); ?>/images/place1.jpg" alt=""  />
    			<?php } ?>
    		    </div>
    	 </li>
    			<?php endwhile; ?>
         </ul>
    
        <div class="clear"></div>  
    
    </div>
    
    </div>
    
       <a href="#" class="prev"></a>
       <a href="#" class="next"></a>
    </div>

    Help is much apriciated as I am not a code writer ;)

  2. Urmas
    Member
    Posted 4 years ago #

    If I get it working that it reads pages with contents and thumbnails (thumbnails are working) then I have to exclude some pages from that list. That feature is needed as well :)

Topic Closed

This topic has been closed to new replies.

About this Topic