I would like to know the best way to attach more content to a post withtout insert html code (layout and class) into it.
Let me explain my purpose, what I have developed and problems:
Purpose: I would like to create a process that allow the wordpress user to be able to add posts without any Html knowledges.
What I have developed: At the moment, my post contain some top text (with different class and id), a picture gallery and a footer(with different class and id).
Here is my code for a post that I attached the “work” category:
CONTENT OF A POST THAT ADD THE WORK CATEGORY
<h1 class="work-title">Title</h1>
<div class="description">Description 1</div>
<div class="description">Description 2</div>
<div class="details">With links and social media</div>
</div>
<ul class="gallery">
<li>
<div class="image"><img class="attachment-large" title="XXXXXX" alt="XXXXX" src="http://192.168.0.11//wordpress/wp-content/themes/RORO/images/cake-factory/img1.jpg" width="900" height="auto" /></div></li>
<li>
<div class="image"><img class="attachment-large" title="XXXXXX" alt="XXXXXX" src="http://192.168.0.11//wordpress/wp-content/themes/RORO/images/cake-factory/img2.jpg" width="900" height="auto" /></div></li>
<li>
<div class="image"><img class="attachment-large" title="XXXXXX" alt="XXXXXX" src="http://192.168.0.11//wordpress/wp-content/themes/RORO/images/cake-factory/img3.jpg" width="900" height="auto" /></div></li>
</ul>
<div id="footer">
<div id="bottom_description_1"> bla bla</div>
<div id="bottom_description_2"> bla bla</div>
</div>
Problem:
Do I have to separate the header/footer of this post and create two other posts in two subcategory that I will retrieve from the page.php file?
How can I create a default post template for the header with this layout? (custom fields)
<h1 class="work-title">Title</h1>
<div class="description">Description 1</div>
<div class="description">Description 2</div>
<div class="details">With links and social media</div>
</div>
How can I create a default post template for the footer with this layout? (custom fields)
<div id="footer">
<div id="bottom_description_1"> bla bla</div>
<div id="bottom_description_2"> bla bla</div>
</div>
What is the best solution to link theses two new posts (header/footer) to the post gallery?
Is there a plugin for it?
Thanks
Here You can read about custom post types:
http://blog.teamtreehouse.com/create-your-first-wordpress-custom-post-type
and about metaboxes:
http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/
More complex and all together:
http://shibashake.com/wordpress-theme/add-metabox-custom-post-type