August 11, 2009
Okay, I know the description of this Forum states "Having a problem with your computer? Get help here" and this is actually a website issue. Still, it is a technical problem and one that has been bothering me for some time now, so I thought it would be best to set my question to fellow Techies to at least try to make some progress, and Tech Support seemed the most appropriate section. Do direct me elsewhere if you think I'm wrong.
Since last year, I've been running my own tech blog, Technically Motivated (I'm sure you've heard of it – a link is in my signature for those of interest). Like dotTech, it runs on WordPress and uses the same Simple:Press Forum add-on, but the similarities end there for the most part. Anyway, due to the nature of the website, rather than stick to WordPress's default behaviour of only showing the most recent posts on the homepage and nothing else, I created a "Home" page to give a quick overview of the site and set that as the homepage. However, this effectively hides the latest posts from the visitors until they click a category of post to see.
What I would like to do is create a page that would still allow me to show both the latest posts and, optionally, those from specific categories I select, but still be able to add my own content to appear on the page as well. However, I am not sure how to go about this. I had read about the get_posts() function of WordPress and, by adding code inline using Shortcode Exec PHP, attempted to use this on the Home page to gather said posts, but this method appeared to create a glitch where the homepage would get treated as the post page for the last shown post, causing screw-ups with layout and add-ons, as well as adding comment boxes on the Home page that should not have been there. I have also tried the PageOfPosts page template, but this appears to be restricted to gathering posts from a single category.
My question, therefore, is does anyone know of a way to design a page in WordPress which can gather the latest posts from multiple categories – either all of them, specific ones I select, or both – and display them dynamically on the page, while still being able to add static content on the page? I do not care how this is achieved – be it a template, add-on, or even in-line PHP Code that I can add in using Shortcode Exec PHP or another PHP add-on – but I would be very grateful for any advice people could give which could help me solve this question once and for all. It's really been giving me nightmares. Thanks in advance!
Edit: It would also be great if the method could also be made to give preference to Sticky posts as is the usual case on the homepage.
October 22, 2008
May I suggest a different approach? (This should work, but be sure to back up your files in case it does not.)
Instead of setting a custom page as your home page, set it back to the default page that shows the latest posts. Then, open your theme's index.php file and modify that. Take the content that you put on the custom page and put it in the index.php file. (You need to be able to understand a little bit of coding.) Then when you visit your website, the custom content you added should show on the main page.
August 11, 2009
D'oh! Why did I think of that before? Seems like a much simpler and effective solution…
Most Users Ever Online: wp_sferrorlog
Currently Online: jmaben
Currently Browsing this Page:
Guest Posters: 11
Newest Members: agapoulini, Irene, rikinmartin02, nelsonlee10, edelen sibulo, Syed Mukhtiar Ali
Administrators: Ashraf (1799), Locutus (1886), amnesia (270)