Adding custom fields to Advert Listing
-
Hi Greg,
I read a post you responded to a couple of years back on this but haven’t been able to make the necessary edits you suggest to add the custom field I want next to Title in the Advert Listing. The post link is https://ww.wp.xz.cn/support/topic/how-to-include-custom-fields-on-the-add-lists-adverts_list/ and you recommend modifying the list-item.php file in WP Adverts / Templates.
I want to add my custom field ‘bedroom_count’ to appear next to Title in each listing. I’ve tried editing the line:
<span title=”<?php echo esc_attr( get_the_title() ) ?>” class=”advert-link”>
with the following code (and various combinations of)
<?php the_title(); echo ‘ ‘ . get_post_meta( get_the_ID(), ‘bedroom_count’, true ) ?>
but no luck.
Can you advise where I need to make the necessary edits? Also should I modify list-item.php directly or in a plug in?
Many thanks,
Richard.
The page I need help with: [log in to see the link]
The topic ‘Adding custom fields to Advert Listing’ is closed to new replies.