Can it work within a queried post?
-
I have a page template which queries posts for their titles and content to bring that into the page (its a very simple cms style site).
Right now it doesn’t work.
I’m sorry I don’t have the site for you to view online.
Here is the code for the page template:
get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> <?php $post_id = 129; $queried_post = get_post($post_id); ?> <h2><?php echo $queried_post->post_title; ?></h2> <?php echo $queried_post->post_content; ?> <?php $post_id = 134; $queried_post = get_post($post_id); ?> <h2><?php echo $queried_post->post_title; ?></h2> <?php echo $queried_post->post_content; ?> </div><!-- #content --> </div><!-- #primary --> <?php //get_sidebar(); ?> <?php get_footer(); ?>
Just tested an image from within the standard page content area and it worked ok. So can I assume I can’t use this plugin with the method I’ve used here?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can it work within a queried post?’ is closed to new replies.