I use Traveler 188.8.131.52 on my website.
I really needed the additional fields for the rental post type (number of rooms, number of bathrooms etc).
And I installed Advanced Custom fields plugin.
I created additional fields.
Did everything by the instruction from this video:
But I did not find among the templates of the website content.php
And tried to input them into
But the fields are not seen anywhere.
Here is the code:
<?php echo get_field(‘bedrooms_number’); ?>
<?php echo get_field(‘bathrooms_number’); ?>
<?php echo get_field(‘pool_length’); ?>
<?php echo get_field(‘pool_width’); ?>
Then I tried to use the shortcode
But it did not help anyway.
What am I doing wrong?
We can’t provide help for specific themes. It’s better you contact the theme developers for that.
What I can tell you is that there’s two things you need to fullfil for
get_field() to work:
1. You need to put it in the right template.
2. It needs to be inside the loop: https://codex.wordpress.org/The_Loop
There’s an exception to this. You can display the values from one post anywhere by setting the second parameter of
get_field() which in the case of posts/pages would be the post ID:
There are a bit more to it as well if you display values from something other than a post but you can find all that information in the documentation.