How can I feed content from one webpage into another??
# October 5, 2012 at 4:12 am
How would I go about feeding content from one webpage into another?
I want to create a Staff Directory that displays a thumbnail image of members of staff and also the first say 20 words of each staff members’ profile.
I want to know if there is a way of feeding this content into the Staff Directory, so that I when one page is updated, it automatically updates the Staff Directory?
Ross# October 7, 2012 at 4:54 am
it is hard to understand what you want to achieve.
content is stored in database or flat file?
is this general php problem or you’re asking how to build thing in wordpress?
if wordpress, check out how to make template file.
if the question is general problem, check out how to store item into database# October 7, 2012 at 12:20 pm
In wordpress prospective:
Pages are just posts, with a post_type of ‘page’ in the database. You can show the content of multiple pages on another page by writing a post query in your pageX template that gets the posts you specify and output them in a Loop.
There are three ways to get post content from the database:
These links all point to the WordPress Codex. Get_posts and query_posts have an argument available, ‘page_id’, where you can specify the id of the page you’d like to retrieve and display.# October 7, 2012 at 1:47 pm
Hi sorry if I’ve caused confusion. It is not a WordPress site that I am referring to. It’s just a regular HTML/CSS website.
To clarify what I am trying to do, I’ll use an example…
I have a web page with a list of products with a small thumbnail image and the a short summary of text beside each product. Each product has its own web page with a larger image and a full product description.
What I want to know is if it is possible to feed content from each product’s page, to the main page containing the full list of products. So I can display the first sentence of each product and a thumbnail version of the large image.
Does this make more sense?
I have heard of something called cURL that can achieve this but I don’t know anything about it.
Ross# October 9, 2012 at 3:51 am
sure you can. if all of this web pages are on same host i think you don’t need curl.
perhaps an easy way to do this is:
put id or class on each element you want to be appear in other page .
You must be logged in to reply to this topic.