Is there a way to dynamically add posts inline to WordPress pages, but still have other content on the page too? | Tech Support | Forums

A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Is there a way to dynamically add posts inline to WordPress pages, but still have other content on the page too?
Topic Rating: 0 (0 votes) 
August 15, 2011
6:08 AM
The Living Spirit
England
Nerd
Forum Posts: 81
Member Since:
August 11, 2009
Offline

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.

Technically Motivated.com – the blog that makes Technology easier to understand and keeps you on the pulse of the latest happenings. Visit today for the latest Tech News, Freebies, Tips, Tricks and more; plus the ability to join a friendly Forum community, or even contribute your own material to be published on the blog. Our Motivation is Highlighting Tech Innovation. My Other Websites: ProjectHangman.com – Game and Software Development and Sharing site, with an emphasis on Community and keeping a positive link between Developer and User. True ZZT – Independent Game Project attempting to accurately recreate ZZT within MegaZeux. A Project Hangman microsite.
August 15, 2011
3:08 PM
Ashraf
Mr. Boss
Forum Posts: 1800
Member Since:
October 22, 2008
Offline
2
0

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 29, 2011
11:07 PM
The Living Spirit
England
Nerd
Forum Posts: 81
Member Since:
August 11, 2009
Offline
3
0

D'oh! Why did I think of that before? Seems like a much simpler and effective solution…

Technically Motivated.com – the blog that makes Technology easier to understand and keeps you on the pulse of the latest happenings. Visit today for the latest Tech News, Freebies, Tips, Tricks and more; plus the ability to join a friendly Forum community, or even contribute your own material to be published on the blog. Our Motivation is Highlighting Tech Innovation. My Other Websites: ProjectHangman.com – Game and Software Development and Sharing site, with an emphasis on Community and keeping a positive link between Developer and User. True ZZT – Independent Game Project attempting to accurately recreate ZZT within MegaZeux. A Project Hangman microsite.
Forum Timezone: America/Los_Angeles

Most Users Ever Online: wp_sferrorlog

Currently Online:
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

phoenix_rising: 899

karen: 878

Wheezer: 786

yourpalal: 647

PCbasics: 614

ebony: 548

Member Stats:

Guest Posters: 11

Members: 9777

Moderators: 0

Admins: 3

Forum Stats:

Groups: 3

Forums: 17

Topics: 2601

Posts: 16629

Newest Members: wehealicen, judymoore, dannyiler, jamesrobert16, marksimeone, santimacco

Administrators: Ashraf: 1799, Locutus: 1886, amnesia: 270

Comments