New to wp but not scripting
-
I am trying to make my main webpage be a list of the posts in my news category. I have 2 ideas but not getting either to work right. If anyone can help me make either one work that would be great.
#1 Is I made a news page and I created a template based of my decoder template. I changed the query to as follows:
<?php
$cat = array(1);$showposts = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
‘category__in’ => $cat,
‘showposts’ => $showposts,
‘caller_get_posts’ => $do_not_show_stickies
);
$my_query = new WP_Query($args);?>
I would really rather the catagory be the word news but I haven’t tried that yet. So when I do this if i visit the news page I see only 1 of the 2 news posts. So something isn’t quite right there. -1 is supposed to mean how many. I tried setting it to 10 also but no difference.The 2nd thing I could do is Make the news category link on the top bar my home page. I don’t know how to do that.
Finally depending on which one I go with, I will need to hide a category or I will have a home and a news which is redundant. I found a plugin to hide categories but it appeared to have an error and I think it hides it from much more then just the top list. I also tried editing header.php as follows:
<?php wp_list_categories(‘title_li=&sort_column=menu_order exclude=1’); ?>
I tried exclude 0 or 1 and saw no difference.
Any thoughts?
The topic ‘New to wp but not scripting’ is closed to new replies.