getCustomField() is not a WordPress function (plugin?). Can we have a look at that function?
I’m not sure where to find that.. I’m using this plugin: http://wordpress.org/extend/plugins/custom-field-template/ for the custom fields on the website
nope! dont have that in there anywhere
should that be added or should the code be altered to do what im trying to do?
should that be added or should the code be altered to do what im trying to do?
No, the function not WordPress and not from the plugin so I think it has to be from another plugin or somewhere else in your theme.
so something else is causing getCustomField() to echo?
Search your theme template files for “getCustomField”
Ok, copying all the theme files to my computer from ftp so i can search them all give me a sec
I don’t see it defined anywhere, all I see is <?php getCustomField('Affiliate Link'); ?> and other types of fields for example: <?php getCustomField('Pricing'); ?> in the template files and i showed you what was in the themes functions.php file.. I also tried the custom-field-template plugin folder and nothing showed up for getCustomField. Would this mean its just echoing by default and its not defined?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
In this function
http://pastebin.com/1jBhNS1n
It isn’t echoing out anything, so where are you using the returned value to echo it out?
I was told that getCustomField is echoing by default and thats why the url is appearing at the very top like what can be seen here: http://cl.ly/image/0k1o2k251q0P but im not sure how to stop it from appearing at the top and inside href="..." instead
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
So if you remove getCustomField(‘Affiliate Link’) from the function, in theory the url will cease to appear at the very top.
Have you tried this?
I havent tried it but how will it work? the ‘Affiliate Link’ link is where the url is entered: http://cl.ly/image/1T320Y211H46
To test what you are talking about. do I just remove getCustomField(‘Affiliate Link’) from
$content = $content . '<a href="' . getCustomField('Affiliate Link') . '">Peek</a>';?