About custom fields
-
I have defined three custom fields namely and i have them in my page-home.php. It gives me back the image url
$inside_image_1 = get_field(‘inside_image_1’);
$inside_image_2 = get_field(‘inside_image_2’);
$inside_image_3 = get_field(‘inside_image_3’);I want to have some something like
<a class="project-item web-design" href="https://www.ynnt.com" data-images="assets/projects/folder/web.jpg,assets/projects/folder/lh.jpg">
The custom field is not required. I want to write a query to display image 1 url if user has uploaded one, display image1 and 2 and three if he has uploaded both or all the images like above where user has two images uploaded.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘About custom fields’ is closed to new replies.