Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • may i ask what your approach was.. cause I’m having the same problem… 🙂

    I recommend the wp-pagenavi plugin.. it doesn’t use ajax at all, and very easy to set up.

    What plugin are you using? I’m trying to find an AJAX pagination system! 🙂

    Thread Starter stompy1208

    (@stompy1208)

    nobody knows?

    Thread Starter stompy1208

    (@stompy1208)

    looks like it worked perfectly guys (or girls)… thanks a bunch!

    Thread Starter stompy1208

    (@stompy1208)

    oohh … ok thanks, I’ll try that when I get home.

    Thread Starter stompy1208

    (@stompy1208)

    Looks like I spoke a little too fast fellas…. :((((

    I have the whole thing working, except for the fact that only ONE post shows up… :??

    I don’t have the CSS ready for it to look good with multiple posts, but the following code:

    <?php query_posts('category_name=Slides&showposts=5');
    	   $slide_image = get_post_meta($post->ID, 'Slide-img', TRUE); ?>
    
    <div class="slide">
    	<div class="slide-image-wrap">
        	<div class="slide-img">
        	<?php if($slide_image !== '') { ?>
                <a href="<?php the_permalink() ?>">
                	<img border="none" src="<?php echo $slide_image; ?>" class="slide-image" alt="<?php the_title(); ?>" />
            	</a>
            <?php }
                else { ?>
                	<a href="<?php the_permalink() ?>">
                    	<img border="none" src="http://www.htgp.org/wp-content/themes/HTGP/images/backgrounds/slide-default.png" class="left" alt="<?php the_title(); ?>" />
                    </a>
           	<?php } ?>
        	</div>
        </div>
        <div class="slide-text-wrap">
        	<div class="slide-title">
            	<a href="<?php the_permalink() ?>"><h2><?php the_title(); ?></h2></a>
            </div>
            <div class="slide-excerpt">
                <p><?php the_excerpt(); ?></p>
    		</div>
        </div>
    </div>
    
    <?php wp_reset_query(); ?>

    shows only 1(the latest) post in the “Slides” category. All three posts shown lower on the page, I have associated with the “slides” category, but only one shows up… ??? this should be the last problem… i hope… 😀

    Thread Starter stompy1208

    (@stompy1208)

    oh.. by the way… final code =

    <?php query_posts('category_name=Slides');
    	   $slide_image = get_post_meta($post->ID, 'Slide-img', TRUE); ?>
    
    <div id="slideshow">
    	<div id="slide-image-wrap">
        	<div class="slide-img">
        	<?php if($slide_image !== '') { ?>
                <a href="<?php the_permalink() ?>">
                	<img border="none" src="<?php echo $slide_image; ?>" class="slide-image" alt="<?php the_title(); ?>" />
            	</a>
            <?php }
                else { ?>
                	<a href="<?php the_permalink() ?>">
                    	<img border="none" src="http://www.htgp.org/wp-content/themes/HTGP/images/backgrounds/slide-default.png" class="left" alt="<?php the_title(); ?>" />
                    </a>
           	<?php } ?>
        </div>
        <div id="slide-text-wrap">
        	<div class="slide-title">
            	<a href="<?php the_permalink() ?>"><h2><?php the_title(); ?></h2></a>
            </div>
            <div class="slide-excerpt">
                <p><?php the_excerpt(); ?></p>
    		</div>
        </div>
    </div>
    
    <?php wp_reset_query(); ?>

    Thanks again

    Thread Starter stompy1208

    (@stompy1208)

    looks like I got it fixed!!! FINALLY!!!
    now I’ve got to fix the CSS… A LOT!! 🙂

    thanks for the help,

    Alex

    Thread Starter stompy1208

    (@stompy1208)

    looks like it works now, but its not showing the images…. arggg..

    I changed the “$slide-image” to “$slide_image” after inserting the old way into my regular loop and it having the same problem, so apparently no “-” can be used in variables??? 🙂

    Still having a problem though… 🙁

    Thread Starter stompy1208

    (@stompy1208)

    nope… still not working…
    Is it even possible to define variables in two different loops?
    should I try defining the $slide-image in my “standard” loop lower on the page?
    Is there another way to define them, because the parse error has a problem with the “=” sign in the line…this is complicated.

    Thread Starter stompy1208

    (@stompy1208)

    what’s that supposed to mean? I have the following code, and it still isn’t working:

    <?php $myquery = new WP_Query('category_name=Slides'); ?>
    
    <?php while ($myquery->have_posts()) : $myquery->the_post();
    	$slide-image = get_post_meta($post->ID, 'Slide-img', $single = TRUE);?>
    
    <div id="slideshow">
    	<div id="slide-image-wrap">
        	<div class="slide-img">
        	<?php if($slide-image !== '') { ?>
                <a href="<?php the_permalink() ?>">
                	<img border="none" src="<?php echo $slide-image; ?>" class="slide-image" alt="<?php the_title(); ?>" />
            	</a>
            <?php }
                else { ?>
                	<a href="<?php the_permalink() ?>">
                    	<img border="none" src="http://www.htgp.org/wp-content/themes/HTGP/images/backgrounds/slide-default.png" class="left" alt="<?php the_title(); ?>" />
                    </a>
           	<?php } ?>
        </div>
        <div id="slide-text-wrap">
        	<div class="slide-title">
            	<a href="<?php the_permalink() ?>"><h2><?php the_title(); ?></h2></a>
            </div>
            <div class="slide-excerpt">
                <p><?php the_excerpt(); ?></p>
    		</div>
        </div>
    </div>
    
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    Could you just tell me what I should have? or exactly what to change because this is starting to annoy me :).

    Thread Starter stompy1208

    (@stompy1208)

    thanks, but I still have the problem that I cannot define my variables… I don’t know if I did it right, but here’s what I got:

    <?php $myquery = new WP_Query('category_name=Slides'); ?>
    
    <?php while ($myquery->have_posts()) : $myquery->the_post();
    	$slide-image = get_post_meta($post->ID, 'Slide-img', $single = true);
    	$thumb-image_class = get_post_meta($post->ID, 'Slide-img Class', $single = true); ?>

    with all the code neccesary and it still gives me a “parse error, unexpected “=” on line 4…(which s the one that starts with “$slide-image”)

Viewing 12 replies - 1 through 12 (of 12 total)