Thread: Tech Quick PHP question
View Single Post
Old 01-11-2017, 12:44 AM  
incredibleworkethic
Confirmed User
 
incredibleworkethic's Avatar
 
Industry Role:
Join Date: Sep 2009
Posts: 2,302
Quick PHP question

$str .= '<div class="thumb-wrap"><a href="<?php the_field('url'); ?>">';


I know I'm a newb, but this line breaks my code.

Is there a way to call a field "URL" (advanced custom fields) within a string of PHP?

If I hardcode the URL instead of that line of PHP, I can achieve what I want but I'm pulling it from a post because each url is pulled from a custom field.
incredibleworkethic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote