I have some meta values on my wordpress custom page that I need to be displayed in a table. Is there any way I can do that.
Here’s the code I’m using now:
<?php the_meta(); ?>
And this is what it shows:
I want to do something like:
I found out that:
the_meta() is located in wp-includes/post-template.php
This makes the output:
<li><span class='post-meta-key'>your_key:</span> your_value</li>
So it’s not recommended to edit files in that folder because of the wordpress update.
You can make a table in html and display each value individually, like this:
<?php echo get_post_meta($post->ID, 'Yout key', true); ?>
Here‘s the documentation or https://codex.wordpress.org/Using_Custom_Fields
Latest posts by admin (see all)
- Install and Running Supervisord in virtualenv python 2.7 - January 24, 2019
- Urgent fix: Briefly unavailable for scheduled maintenance. Check back in a minute. - January 22, 2019
- Change WordPress post date format to time ago - January 21, 2019
Also published on Medium.