I’ve got question about content for wp theme.
I’m thinking about re-doo my templates as wp theme, but I’m not sure how to set up content – I’ve got subpage with i.e. tables – should I create as many page templates as subpages in template and ask buyer to edit actual .php file or set up something like custom fields and use them to pull just bit of informations ?
Regards – Matt.
Hi Matt, I am not sure if you know how WordPress and WP Themes work, so I just explain it briefly:
In your WP Theme you will need files like index.php, single.php and page.php. The index.php is obviously the homepage and got the loop in it for displaying the blog posts. Single.php displays one post of the blog and is similar to page.php, which is the page template for every static page on your website.
Of course you can create loads of page templates for e.g. sidebar on the right side, left side, no sidebar at all, different header or footer etc., but you will not have to create a page template for each subpage you have that has the same layout (like header, content, sidebar and foote), because all those pages are automatically using page.php. (Same goes for single.php and blog posts by the way)
The content is again pulled by a loop from your WordPress database, that’s why it is possible to use the page.php multiple times, because the content – unlike in HTML templates – is not hardcoded.
So the buyer won’t have to edit the php files because s/he will just create the pages in the WordPress backend.
Is that the information you needed?
If you already know all of this I misinterpreted your question.
All the best!
Thanks glossycat – first paragraph I did know.
The thing is … if the content for subpages contains something unique for each – like html table with prices, register forms etc., customer will have to enter manualy content using admin panel ->pages ->new page. Or … shoul I prepare .css file and provide html formated content and put that in manual: 1. create new page, 2. name it “blablabla”, 3. copy this text (some html formated content), 4. press html tab, paste text … and so.
Posts use only like … latest news or something like this – because subject of “hosting” doesn’t need a blog (in my mind).
Cheers – Matt.
- Microlancer Beta Tester
- Exclusive Author
- Has been a member for 2-3 years
- Sold between 1 000 and 5 000 dollars
- Bought between 10 and 49 items
- Referred between 1 and 9 users
- Most Wanted Bounty Winner
- Grew a moustache for the Envato Movember competition
For that Case I would suggest you to create a shortcode – preferably as a plugin. But there are many other ways to do that. I for myself had created the tables with a table plugin – which adds some proper table controls to the editor. I then made a standard table style and a fancy table style. Buyers then only have to add a class to the table.
Of course it would be much easier to have a kind of backend interface for that – Users prefer it easy (KISS Approach).
For other stuff you could also use custom fields, custom post types, post formats or a combination of them.
To be specific: For Tables I would just make the table styles and maybe offer a demo table which people can copy and paste, suggest to use the Table Plugin and let them style the table using classes. For Signup and Login I would use Shortcodes and Widgets.
thank your for your input – I’ll definetly take closer look in to this Table Plugin.
Thanks guys for advice.