North.Vision Posted July 30, 2014 Share Posted July 30, 2014 How to i get a custom field to show on other pages? what is the tags ? custom field name is: Demo Field 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 30, 2014 Share Posted July 30, 2014 the answer will depend upon two things - what type of custom field it is (client or product), and also which page(s) you want to use it in. the easiest first step will be to add {debug} to your template code on the page you want to use the custom field on - that will open a popup window with a list of variables and arrays that you can access... if the custom field (it might not have a name, just a number) you want is in there, then you will be able to add it to the page... if it isn't, then it would take a little more work to use it. if it's a client custom field, it will likely be in the {$clientsdetails} array. 0 Quote Link to comment Share on other sites More sharing options...
North.Vision Posted July 30, 2014 Author Share Posted July 30, 2014 Hello Brian, Thanks for the reply, it's Client Custom Field and let's say header.tpl for example 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 31, 2014 Share Posted July 31, 2014 (edited) if you only have one client custom field, try using {$clientsdetails.customfields1} if it doesn't work, add {debug} to the template, and you should be able to find the customfieldsX value from the popup window. remember the value might be empty (depending on the custom field type) unless the client is logged in. Edited July 31, 2014 by brian! 0 Quote Link to comment Share on other sites More sharing options...
North.Vision Posted July 31, 2014 Author Share Posted July 31, 2014 What about adding it in php? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 31, 2014 Share Posted July 31, 2014 $clientsdetails = $this->get_template_vars('clientsdetails'); $custom1 = $clientsdetails[customfields1]; and then echo or print $custom1 wherever you want to show it. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.