Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

post question

Status
Not open for further replies.
Joined
Nov 8, 2005
Posts
2,496
Reaction score
33
I have a wp site which I want to fix which posts appear on the homepage. Unfortunately I don't know how to do this and the guy who's theme it is isn't forthcoming with an how to either. As a workaround I'm having to change the post creation dates but am wondering what the effect is if I add a new post today but date it a month or so ago? does google see it as a new post or as dated?

thanks in advance.
 
All depends on how you have the homepage set up, and the themes home.php/index.php page loop generation code.

In the admin > settings > reading section you can set the homepage to show the latest posts or a custom static page. The latest posts is really the posts that the current themes 'loop' generates. The static page is a page from the pages you have on your site this can be a staticpage or a custom loop.

I've mentioned 'loop' a few times because that's the term WP uses for the section of code that WP uses to retrieve the posts for display. You'll hear of the phrase 'in the loop'.

If you have the above read settings to normal latest posts then look inside your themes index.php page (frameworks like studiopress / woo might use get_template_part functions) to find the section that generated the loop. It will be the section that uses query_posts get_posts or WP_Query. Each has a slightly different methodology but do 'roughly' the same thing, retrieve an array of posts.

WP's default is to retrieve by descending date ie latest post first. The arguments passed to these functions changes the sql used to retrieve the list.

http://codex.wordpress.org/Template_Tags/get_posts
http://codex.wordpress.org/Function_Reference/query_posts
http://codex.wordpress.org/Class_Reference/WP_Query
 
The easiest way is to create a PAGE (not post) and set that as the homepage via Settings > Reading
 
The easiest way is to create a PAGE (not post) and set that as the homepage via Settings > Reading

Having the setting as show latest posts is still using a page, it's just a hidden page of sorts using the themes index.php/home.php.

Using a custom page would still require the page to have the code to generate the loop if he wants to display a selection of posts by date/category/custom-post-type/whatever. This would either be via a tweaked page template in the current theme or via a forked/custom page template attached to a new page, again with a loop generator using specific parameters either hardcoded in to the page or dynamically via query_vars.

Sound difficult, not really just needs a bit of tinkering.
 
I've asked the developer about making sticky and he said he'll have a look but that was ages ago. The support leaves a lot to be desired.

The site layout is more or less done so can't really switch things too much now. The homepage is widgets of recent or popular posts.
I'm not that aufait with the code tbh.

I can pm the url if required.
 
I've asked the developer about making sticky and he said he'll have a look but that was ages ago. The support leaves a lot to be desired.

The site layout is more or less done so can't really switch things too much now. The homepage is widgets of recent or popular posts.
I'm not that aufait with the code tbh.

I can pm the url if required.
Yes go ahead and send I'll take a quick look.

Also what happens if you try this

Go to the admin open a post you would want on the homepage
in the publish box on the right click edit next to Visibility: Public
This should drop down with a few options what happens now if you tick
Stick this post to the front page.
Click OK then update and check the homepage.
Does anything happen if not its probably down to the use of widgets to generate the homepage.
 
Are you sure its been core since 2.7 it should be their unless plugin are overriding something
 

Attachments

  • wordpress.jpg
    wordpress.jpg
    40.7 KB · Views: 66
  • wordpress2.jpg
    wordpress2.jpg
    36.4 KB · Views: 57
I'm being a doughnut, it is there. I was looking at the status part. Thanks for the screenshot! I've made one sticky and will test by doing a new post.

Thanks All
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom