I am new to wordpress, I come from Silvestripe development.
I have developed a FAQ accordion that has a tittle and description.
In silverstripe I would create a dataobject, relate it to the desired page and then output it by looping through the records in the template.
<div class="accordionContainer">
<ul>
<% loop accordion %> //loop data object
<li>
<h2 class="accordionHeader"><a href="#">$Title</a></h2>
<div class='accordionContent'>
<div class ="accordionBlock">
$Description
</div>
</div>
</li>
<% end_control %>
</ul>
</div>
How can this be achieved in wordpress??
Thank you in advance 🙂
Although WP now allows custom post types (like page types in Silverstripe), it looks like relationships may need to be handled by a plugin.
There are some details of a plugin here: http://wordpress.org/plugins/relation-post-types/ which suggests that one to many relationships can be achieved using it (“rented houses connected to an agency”)