On the top of the main page, under the header I want to add text/box that says “Image Section” , That I know how to do, Just add a menu.
But when Someone click on that, I want them to be taken to a page which looks like that main page with the same ammounts of posts per page etc but this time its only images. So The main pages has 8 new videos per day. And when you click on “images section” you go to a page with 8 new images per day.
How do I do this? I have tried, and looked around but no luck. I thought it was going to be super easy. But no, and I have no idea why.
So, I first create a .php file (through wordpad?) named “Snarfer” (for now) and inside that file I add the code.
Then I create another .php named “pageofposts.php” with that code inside it and save it.
Then I add both of those files inside my current theme folder through a ftp program? Thats the first step? =)
Or do I just add the pageofposts code below the sparfer coding? in that snarfer .php
and then upload the snarfer.php through my proxy with both of the codes into my current theme folder
and then create a page in wordpress, not adding any text but just a title and then int he “selct template” I select “Snarfer” and press publish, and then I add posts to That template?
I have done as you said now. And added the page into the “main menu” or whatever its called so I have it under the mean header. But clicking on it it has added a bunch of stuff automatically. How to I remove that and start adding posts with images in them?
Well my whole point of this was to being able to add images to a “photos” section of the site..
Since I mentioned that in the first posts I thought that was what you were helping me with..
Create a category called Photos. File posts under the Photos category as required. Amend the PageofPosts template to pull from the Photos category. Job done.
as you can see that seems to be the case now, Now its just the problem of removing the photo from the main page, and still having it show up when you Click “photos”
// If I ever in the incredible distant future make some money from this site, I will give you some asmi lol.
You now need to add a custom query to the theme’s index.php template file to exclude the Photos category. First you need to How do I find an id?“>find the id of the Photo category (let’s assume it’s 23), then create your new custom query:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args= array(
'cat' => '-23', // the id of the Photos category
'paged' => $paged
);
query_posts($args);
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
[etc]