I’m sure this isn’t possible but thought I’d ask.
I have a testimonials section, the html of each testimonial is like so
<p>
the testimonal here blah, blah, blah, blah, blah, blah, blah, blah
<em>Name of person</em>
</p>
Now in WP I have the testimonials as a Custom post type. The Name of person is the title and the testimonial is the content.
Can I output the testimonial post so it’s like the html.
So it would be the_title inside a ’em’ which is inside the ‘p’ of the_content.
I know I could add the name inside the content in wordpress and then make that italic but I know the client wouldn’t like doing this.
You could achieve that with a filter on
the_content
:You can just repeat the_title() after the_content(), as @Howdy_McGee suggested, or use the_content filter. For example:
Just a note: don’t use
the_title()
inside the filter becausethe_title()
will echo the title and is not suitable here. Useget_the_title();
instead.Build a shortcode:
Then add
[the_title/]
to your post body wherever you want the title to appear.I feel CSS is best suited for this personally.
Inside Your Loop
CSS – Here you can move it or style it however you want: