CMS – adding sidebar content within post
-
Hi, new to this forum but not to WordPress…
I’m working on my first WordPress-as-CMS project here and have had success for the most part. I am hung up however on one aspect. I have one post that needs to be split into two divs.
I have a category called Profiles that’s like a bios section for the company staff. The posts in Profiles must be displayed with a little sidebar with bullet points. The user has a brief bio then to the right of that there’s several bullet points titled “Relevant Experience”.
I’d like the HTML from the post to look like this (abbreviated):
<div id="doublecol1"> <h3>Person's Name Here</h3> <h4>Title Here</h4> <img src="imgs/profile010.jpg" alt="Name Here" class="profileimg" /> <p>Profile text here of several paragraphs.</p> </div> <div id="doublecol2"> <h4>Relevant Experience</h4> <ul> <li>Some text here</li> <li>some more text here</li> <li>final bullet text</li> </ul> <p class="download"><a href="#">Download Profile</a></p> </div>
With this I can just make doublecol1 and doublecol2 show up as a two col layout with CSS.
Now I could probably insert all of this into a post (assuming it wouldn’t change all my divs into paragraphs). The problem then comes when the client wants to add or modify one of their profiles however.
How can I make this sidebar without having to put my HTML into the post? I would LOVE to be able to have in the post some code like
<sidebar><h4>
Relevant Ex…..</sidebar>
then use some PHP to find and replace that with my <div id=”doublecol2″></div>. This way the client cannot mess anything up.Has anyone done something like this before? Any advice would be much appreciated.
- The topic ‘CMS – adding sidebar content within post’ is closed to new replies.