Worked All Week On One Problem
-
I’m going crazy. I don’t understand how this has to be so hard. I’m using the latest WordPress version and Digital Orange 76 theme.
First off when I select in Settings/Reading the radio button to make my posts appear on the front page. They DO appear on the front page but if you click on any other page you lose the ability to go back to the posts page. And there doesn’t seem to be a particular page for the posts.
OR I select the radio button in Settings/Reading for having a static page for my posts that’s all fine and dandy but what if I want posts on the front page too?
I’d like to put posts on any page that I want. How is that so hard to do with WordPress? If there’s a way to do it fine. But why have I been searching all week working 8 hours a day on this problem and not finding anything. I’ve tried all kinds of plugins. Nothing worked. And why would I even NEED a plugin for this very simple thing I want to do?
-
I don’t understand why there can’t be a simple place to select what page you want to post to be on when you create a new post. Is there something I’m missing?
I even went to the guys page who created the theme and he has posts on pages all over his site on almost every page. I asked this question in his comments and he never got back to me.
the way to do this is to use page templates:
general:
http://codex.wordpress.org/Pages
more specific in there:
http://codex.wordpress.org/Pages#Page_Templates
as a guideline (you need to keep your theme’s structure):
http://codex.wordpress.org/Pages#A_Page_of_Posts
how to define what to show:
http://codex.wordpress.org/Function_Reference/query_postsI even uninstalled WordPress off the server and reinstalled it because I thought I must have screwed something up trying everything imaginable. When I reinstalled WordPress it was the same thing. So this must be some kind of default where WordPress doesn’t let you do this right out of the box.
And I don’t feel like I’m asking to fly a car to the moon. It seems like this should just be a simple thing to do but it’s not.
Ok I’ll look into page templates. But this is going to take me another week to figure out and I don’t understand why this has to be so hard to do. I’m not stupid. I can do almost anything on a computer and when I find something like this it’s usually a design flaw that shouldn’t be like that in the first place.
So this is NOT something you can do with WordPress right out of the box. And you mean to tell me I have to cut and paste code just to get this to work? I’m looking through those links and it’s WAY too complicated for something so simple. WordPress seemed simple once I started using it and I was so glad I switched over. But now it’s the same old same old. Now I have my page up and it’s going to be weeks before it’s not still under construction.
I tried the inline posts plugin but it didn’t make the posts look the same as the WordPress original posts.
Oh God this is complicated. So I need to create a page template that is somehow the same as my post page? But it’s not a default?
Under Default Theme Page Templates the only options are…
-page.php – Default Page Template: displays Page content
-archives.php – ignores Page content and instead displays a list of Archives…
-links.php – ignores Page content and instead displays your links…I think this is what I need…
“A Page of Posts – A Page Template that displays posts from a specific category depending on a Custom Field assigned to a Page. In this example the value of the Custom Field “category” is retrieved and used as the category to retrieve the posts in that category. So if the category of posts you want to display is called “Events” then assign the Custom Field “category” with a value of “Events” to the Page. Note that this will adhere to pagination rules meaning that four (4) posts will display per page with links to older/newer posts provided. This is designed to work with the WordPress Default theme (aka Kubrick), but should work with other themes with a little modification.”
But this paragraph is so complicated I had to read it ten times to understand it. So do I cut and pasted code below this paragraph? And put it where? In the actual box where I create the page? Or post? Or is this creating a template? And then I create the page? And then make the post for the page? Does anyone see how complicated this is?
Wouldn’t it be easier to have one drop down menu when you’re creating posts. “Hey! Put this post on that page!”
I’m giving up again today. I’ve worked on this since 8 in the morning and it’s 2 pm now. No one is here to help. It would be easier to get another job, save money and pay someone to make my website.
the easiest way to start a page template:
– copy index.php (or single.php if index.php has too many features) and save it under a new name – mypagetemplate.php for instance;
(this way you already have the same html structure, and the page using the template will look like the rest of your blog)– at the beginning of this new php file, add the bit of code to mark it as a page template:
<?php /* Template Name: my page template */ ?>– before the loop (usually before the line with
<?php if(have_posts()) :) put the line of code with the query_posts():
<?php query_posts('posts_per_page=5'); ?>
(you need to inform yourself about all the parameters to customize the query)– the go to admin / pages / add new;
give your page a name, for instance ‘News’, and select the new page template from the dropdown list in ‘attributes / template’ at the right side, a bit further down.– this is basically all.
In my limited experience, the easiest way to do this is to use the Page Links To plugin with categories. You can create as many pages as you want and assign each one to a different (or multiple) category using the plugin.
Then when you want a post to go on a particular page, just check the correct category and you’re done.
Ok I learned how to create a page template with the specific query_posts cat ID number that I got from the category. I created a page with one template that I wanted for Home. My first page. I then wrote a post and created it with that category. Home. Because I want some posts to go to home and some posts to go to other stuff I wrote.
I created another page template with another cat ID number. I created that page with that template. I created a post with that specific category, “Other Stuff I Wrote” that I do NOT want on the front page.
It didn’t work. I even tried putting the minus sign before the number to tell that post NOT to go to that page with that category. That didn’t work either.
First off logic would dictate that WordPress would just have a place where you could select which page you want a post to go on and it would just be in the admin. But NO WAY. I guess the design people just don’t think that way. That’s way too easy.
So I learn how to create page templates and create specific cat numbers for these posts to go to with their own specific categories from a template I hacked. Sounds like that would work right? Oh but NO AGAIN.
What I want to know and what I want someone here to admit is that this is designed wrong. I know I’ll probably figure it out eventually because I can hack just about anything. But why would I have to go through all this trouble? It seems ludicrous to me when everything else about WordPress is easy. I know everything I need to know about WordPress from working on this one problem except this one thing. How do I put some posts on my home page and have different posts on another page. Why is that so hard?
I’m just talking to my girlfriend about how silly this whole thing is and she said, “You should go back to Dreamweaver” Which is hilarious to me because I started using WordPress because it’s ten times easier than Dreamweaver. But now I look at all the time I wasted trying to fix this one problem and I would be almost an expert on Dreamweaver by now.
I finally got it to work. One template did NOT have this at the top…
<?php
/*
Template Name: Stuff
*/
?>but it did have the query_post with a negative sign before the cat id number…
The other template had the added code at the top with my template name Stuff and the query_post with the same number without the negative sign… Here’s some notes…
Created a Home category
Found home page post and set category to Home
Removed Stuff category from all pages
Deleted Stuff category
Copied stuff.php to home.php
Changed Template Name to Home (in top contents of file)
Changed filter in home.php to: query_posts(‘cat=4’)
Changed Home page template to Home
Changed filter in stuff.php to query_posts(‘cat=-4’)
Changed Stuff page template to Stuff
Update to Stuff page was not effective.
Deleted Old Stuff page
Recreated Stuff page with same settings (title, order, template)
Finally Works!But seriously… Come on people… That’s way too much to go through just to have two different pages of posts…
The topic ‘Worked All Week On One Problem’ is closed to new replies.