Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   How to post on 2 seperate "Pages" or "Cats" (http://forum.bytesforall.com/showthread.php?t=533)

TPR Feb 24, 2009 03:37 PM

How to post on 2 seperate "Pages" or "Cats"
 
I need to be able to make posts and not have them appear on the main page. How can I do this?

I'm using the main page as a blog that will have post daily.

I need to be able to post to the secondary page and not have it show up on the first page.

What is the best way to set this up? Do I need a PlugIn?

I tried Page2Cat but it just bullet point lists Category Titles.

Flynn Feb 24, 2009 04:19 PM

To have posts of a certain category not show up on the home page, find, in index.php, around line 100-103, this:

PHP Code:

    <?php // Do this for all posts:
    
while (have_posts()) : the_post(); $postcount++; ?>

(You might not have the $postcount++ part if your Atahualpa version is older)

and add the following right above it (to exclude posts of the category with the ID 3):
PHP Code:

<?php if ( is_home() AND !is_paged() ) {
query_posts($query_string "&cat=-3");
?>

To exclude posts from several categories, i.e. categories with the ID's 3, 7 and 11:

PHP Code:

<?php if ( is_home() AND !is_paged() ) {
query_posts($query_string "&cat=-3,-7,-11");
?>


TPR Feb 24, 2009 04:48 PM

1 Attachment(s)
I do have that code. It's around line 41 though.

I was hoping that I could create a custom field or do something else. I would like to avoid having to update my index.php every time I post to the secondary page.

Any other Ideas or suggestions?

Flynn Feb 24, 2009 05:07 PM

Why would you have to update your index.php each time? If you want a new post to not appear on the homepage, put it into the category that you excluded with the above code.

TPR Feb 24, 2009 05:21 PM

I don't know what I was thinking, you're right.

TPR Feb 25, 2009 06:54 AM

The code works, the new posts are now only posting to the Category I want them to.

Is it possible to not have those posts show up in the "Recent Post" widget?

Also the posts to the Categories show up in a "Collapsed" state, not showing the content in the body, only the Title. Any idea about this?

Flynn Feb 25, 2009 07:02 AM

Quote:

Originally Posted by TPR (Post 2111)
The code works, the new posts are now only posting to the Category I want them to.

Is it possible to not have those posts show up in the "Recent Post" widget?

Probably with another widget, something that offers more options. See http://wordpress.org/extend/plugins/

Quote:

Originally Posted by TPR (Post 2111)
Also the posts to the Categories show up in a "Collapsed" state, not showing the content in the body, only the Title. Any idea about this?

Only the title, or the title and a part of the body? Are you using the Read more tag
HTML Code:

<!--more-->
in those posts? That would require another code

TPR Feb 25, 2009 03:21 PM

Quote:

Only the title, or the title and a part of the body? Are you using the Read more tag
After looking at it a little closer. It will show the Text in the body, but not the images/media in the body. When the Post Title is clicked the body will expand and show the image/media.

No, I'm not using the more tag.

Quote:

Probably with another widget, something that offers more options. See http://wordpress.org/extend/plugins/
I can't find something to work that doesn't through off the design of the site. All That I need is the widget to not display comments from a couple categories.

Nad Apr 2, 2009 10:07 AM

Quote:

Originally Posted by Flynn (Post 2078)
To have posts of a certain category not show up on the home page, find, in index.php, around line 100-103, this:

PHP Code:

    <?php // Do this for all posts:
    
while (have_posts()) : the_post(); $postcount++; ?>

(You might not have the $postcount++ part if your Atahualpa version is older)

and add the following right above it (to exclude posts of the category with the ID 3):
PHP Code:

<?php if ( is_home() AND !is_paged() ) {
query_posts($query_string "&cat=-3");
?>

To exclude posts from several categories, i.e. categories with the ID's 3, 7 and 11:

PHP Code:

<?php if ( is_home() AND !is_paged() ) {
query_posts($query_string "&cat=-3,-7,-11");
?>


Hello,

I found this post very helpful, however I tried it on my website: www.gametvweb.com didn't work, Actually the instruction
<?php // Do this for all posts:
while (have_posts()) : the_post(); $postcount++; ?> was in page.php file not the in index.php. I dont want to havefeatred articles to be posted on the main page, do u have any clew :( how to do it.
any help will be much appreciated.
thanks

Flynn Apr 2, 2009 09:32 PM

You shouldn't have a page.php. What Atahualpa version do you have?

Nad Apr 3, 2009 01:35 AM

Sorry I don't know what is Atahualpa :confused: ? how can I know which version is? the only think I know is I'm using wordpress 2.7.1 !!!

But definitely the them has page.php file, I included the them file on this link http://www.gametvweb.com/theme/ please take a look at them and let me know what do u think?

Your help really appreciated.

Thanks

Flynn Apr 3, 2009 07:47 PM

Quote:

Originally Posted by Nad (Post 4137)
Sorry I don't know what is Atahualpa :confused: ? how can I know which version is? the only think I know is I'm using wordpress 2.7.1 !!!

But definitely the them has page.php file, I included the them file on this link http://www.gametvweb.com/theme/ please take a look at them and let me know what do u think?

Your help really appreciated.

Thanks

You seem to be using another theme. I cannot support other developer's themes I'm afraid. I suggest that you ask on the blog of the developer of your theme.

Nad Apr 4, 2009 02:20 AM

Sorry I didn't know that :o, but thanks for your time anyway :)

misspensen May 20, 2009 06:35 AM

Thank to everyone for the explanations.
Reading you guys talk through these issues really helps a beginner like myself :D

ecampervanhire Jul 29, 2010 08:23 AM

Hi Flynn, I was wondering if we could backtrack to a part of post #1

Quote:

I need to be able to post to the secondary page and not have it show up on the first page.
NOT having a post turn up has been dealt with, but what about getting it to turn up on the 2ndry page?

How to post a certain category, in this case "news" category posts, to a page called NEWS, whilst any other posts will go to HOME page? I have page2cat plugin, but that doesn't seem to work even though I have filled in all the bits that need to be filled in and linked it all together.

Any ideas?

juggledad Jul 29, 2010 09:13 AM

I put together a 'HOWTO: a 'Custom Query' PAGE template' thread with a template to allow you to make custom queries because page2cat didn't work for me. see
http://forum.bytesforall.com/showthread.php?t=7822

it is in the gold forum

writeleft Jul 29, 2010 06:11 PM

I've achieved this on a site using the List Category Posts plugin.

http://picandocodigo.net/programacio...lugin-english/

ecampervanhire Aug 4, 2010 05:32 PM

Hi Juggledad,

Quote:

I put together a 'HOWTO: a 'Custom Query' PAGE template' thread with a template to allow you to make custom queries because page2cat didn't work for me. see
http://forum.bytesforall.com/showthread.php?t=7822

it is in the gold forum
i have donated as instructed and still can't get in to your thread. I have also written to Flynn to mention this to him (it says to PM him at the top of this forum if you make a donation). Is it up to Flynn or you to credit this donation? Please PM me if you need the email address I used.

juggledad Aug 4, 2010 08:24 PM

Send me a PM with a copy of the pay pal confirmation and I'll look into it


All times are GMT -6. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.