I would like to know how can I define a post template and adding automatically the html layout when we are creating a post?
Do I have to use custom fields?
For example:
Post content:
Title
Description 1
Description 2
With links and social media
Html layout result:
<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>
Thanks
You could alter the output of the function
the_content()by using (infunctions.php) something like:Which will alter the content before the paragraphs are added. And if you don’t want paragraphs at all use:
Check out the codex page on apply_filters() for more info on the function.