Jump to content

Beginner Wordpress Problem


BorysSokolov

Recommended Posts

I am in the process of developing a Wordpress theme, and I'm having difficulties with setting up the pages correctly. Namely, the content of index.php displays on each page, instead of the content corresponding to the page. For instance, the page "Inuit", with the content of "test" in the page admin area, displays posts, rather than the content. The same goes for every other page.

 

Here's index.php:

<?php get_header(); ?>

<?php
$query = new WP_Query(array('posts_per_page' => 6, 'post_type'=>'some_posts'));
while($query->have_posts()) : $query->the_post(); 
the_content();
endwhile;
?>

<?php get_footer(); ?>

And those are the two pages listed in "Pages" in the admin area: Inuit, Test2

 

To clarify, what I'd like is to have the index page display the content AND the posts, and all other pages to display only their own content.

 

 

Thanks in advance for any replies.

Link to comment
https://forums.phpfreaks.com/topic/282767-beginner-wordpress-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.