Cool, thanks. I really appreciate the apology and donation. You caught me still online, I was just thinking to nap before dinner here in Lawas, Sarawak, Malaysia.
I would recommend copying your theme’s current archive.php
file to archive-testimonials-widget.php
.
Then in the loop context area, revise the layout as desired. Within the loop itself or the renamed content.php
to content-testimonials-widget.php
you can use <a href="https://codex.www.ads-software.com/Function_Reference/get_post_custom">get_post_custom</a>
to pull the custom meta data.
This will give you a result array like the following.
Array(
[_edit_last] => Array
(
[0] => 1
)
[_edit_lock] => Array
(
[0] => 1358221258:1
)
[_metaidlast] => Array
(
[0] => 4
)
[testimonials-widget-title] => Array
(
[0] => Auckland, New Zealand
)
[testimonials-widget-email] => Array
(
[0] =>
)
[testimonials-widget-company] => Array
(
[0] =>
)
[testimonials-widget-url] => Array
(
[0] => https://www.ads-software.com/support/profile/gorgeouscreative
)
[_thumbnail_id] => Array
(
[0] => 14809
)
[_wp_old_slug] => Array
(
[0] => gorgeouscreative
)
)
As you can see, the later array keys, like testimonials-widget-*
, let you know which meta fields exist.
To have easier access, you can use <a href="https://codex.www.ads-software.com/Function_Reference/get_post_meta">get_post_meta</a>
like get_post_meta( get_the_ID(), 'testimonials-widget-title', true );
to grab the single entry of the testimonial job title or location data.
Don’t forget to update content.php
to content-testimonials-widget.php
in your archive-testimonials-widget.php
file, if needed.
Do you need more guidance?
Ciao!