davidelliott294
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: Posting posts in a certain category to specific pagesNever mind. Sorted it.
my code for the page now looks like this:
<?php /** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the wordpress construct of pages * and that other 'pages' on your wordpress site will use a * different template. * * @package WordPress */ /* Template Name: howto */ ?> <?php get_header(); ?> <!--Start Content Wrapper--> <div class="grid_24 content_wrapper"> <div class="grid_16 alpha"> <!--Start Content--> <div class="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: endif; ?> <?php query_posts('cat=6'.get_the_title().'&post_status=publish,future');?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <p><?php the_content(); ?> <?php endwhile; else: endif; ?> <!--Start Comment box--> <?php comments_template(); ?> <!--End comment Section--> </div> <!--End Content--> <?php endwhile;?> </div> <!--Start Sidebar--> <?php get_sidebar(); ?> <!--End Sidebar--> </div> <!--End Content Wrapper--> <div class="clear"></div> </div> <!--End Container--> <?php get_footer(); ?>and it works (y).
Forum: Fixing WordPress
In reply to: Posting posts in a certain category to specific pagesAlso changing query_posts to get_posts does nothing other than mess up the layout of the posts.
Forum: Fixing WordPress
In reply to: Posting posts in a certain category to specific pages<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: endif; ?> <?php get_posts('cat=6'.get_the_title().'&post_status=publish,future'.post_per_page="10");?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <p><?php the_content(); ?> <?php endwhile; else: endif; ?>So the code looks like that? Specifically aimed at post_per_page parameter as i’m not 100% that is correctly written. I can only edit PHP.
Wont it take the default settings from what is set in settings?
Viewing 3 replies - 1 through 3 (of 3 total)