Title: jonoc73's Replies | WordPress.org

---

# jonoc73

  [  ](https://wordpress.org/support/users/jonoc73/)

 *   [Profile](https://wordpress.org/support/users/jonoc73/)
 *   [Topics Started](https://wordpress.org/support/users/jonoc73/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jonoc73/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jonoc73/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jonoc73/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jonoc73/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jonoc73/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Display an include from a Custom Field Value](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/#post-1065218)
 * Ok, I have a custom fields key of gt_guides and there are a list of checkboxes
   for the staff giving values of Phil Rob Nic and Jef etc. Each has their own php
   file with a div and some contact info like this:
 *     ```
       <div id="guidewrap">
       <div class="guide"><a href="http://www.website.com/guides/phil"><img src="/images/guides/phil.png"/></a></div>
       <div class="details"><a href="http://www.website.com/guides/phil">Phil</a></div>
       <div class="contact">Email: <a href="mailto:phil@website.com" title="Email">phil@website.com</a></div>
       ```
   
 * I want to display the div containing their contact details if their name is selected
   in the checkbox. If their name isn’t checked then I don’t want anything to show.
 * The above code does word but I was wanting to know what I should remove from 
   it as it was originally written to echo a list of names like Phil, Rob, Nic instead
   of including a php file.
 * Thanks Jono.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Display an include from a Custom Field Value](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/#post-1065206)
 * Sorry guys, yes I should have written more to explain!
 * At the moment the above script was written to display guide names if they were
   filled in in a custom field. They would display like: John, Kev, Peter
 * Instead of just their name I wanted to display a div containing things like a
   small images, email and phone details – this was via the TEMPLATEPATH line.
 * However I am still using the same code as if they were a list of names including
   the ‘comma’ between them.
 * So what would I take out of the above code?
 * Thanks for your help once more.
 * Jono.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Help! My Breadcrumbs are all messed up](https://wordpress.org/support/topic/help-my-breadcrumbs-are-all-messed-up/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/help-my-breadcrumbs-are-all-messed-up/#post-1065746)
 * I have figured it out – I need to put the breadcrumb in the loop.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Display an include from a Custom Field Value](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/display-an-include-from-a-custom-field-value/#post-1065185)
 * What would I take out if I didn’t want a comma’ed list? I just wanted a list 
   of the included templates?
 * Thanks J
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Displaying Custom Field checkbox](https://wordpress.org/support/topic/displaying-custom-field-checkbox/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/displaying-custom-field-checkbox/#post-1063885)
 * I took a look at the code again and it’s simple really isn’t it!
 * I replace
 *     ```
       if ('John' == $guide )
       {$out .= $guide  . ' is a man' . $between;}
       ```
   
 * with
 *     ```
       if ('John' == $guide )
       {include(TEMPLATEPATH . '/guides/john.php'); }
       ```
   
 * Thanks for your help.
 * Jonathan
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Displaying Custom Field checkbox](https://wordpress.org/support/topic/displaying-custom-field-checkbox/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/displaying-custom-field-checkbox/#post-1063882)
 * Michael, You’re helping loads – thanks once again.
 * When I asked if I was able to do something with each value I meant doing something
   like including a template path for example.
 * I should have explained it more sorry.
 * If the value is John I want to include a template where I can include his photo,
   contact info etc.
 * `<?php } else { include(TEMPLATEPATH . '/guides/john.php'); } ?>`
 * If the value includes Mary I want to include a template where I can include her
   photo, contact info etc.
 * `<?php } else { include(TEMPLATEPATH . '/guides/mary.php'); } ?>`
 * Thanks for your help so far – it’s been great.
 * Jonathan
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Displaying Custom Field checkbox](https://wordpress.org/support/topic/displaying-custom-field-checkbox/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/displaying-custom-field-checkbox/#post-1063870)
 * That’s great – thanks for your help it works, but it’s not too pretty though.
   How would I add a space and a comma into the code to get something like: John,
   Ben, Claire
 * Also am I able to do something with each value. Say I used the if statement shown
   in the first post above, if the value is John do this and if the value is Ben
   do that?
 * Thanks Jonathan
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Displaying Custom Field checkbox](https://wordpress.org/support/topic/displaying-custom-field-checkbox/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/displaying-custom-field-checkbox/#post-1063861)
 * Thanks Michael, I have probably done this wrong, but put the above into the code
   and it just returns the word Array instead of the tour guides names.
 * `<?php $single=false; echo get_post_meta($post->ID, "guides", $single); ?>`
 * Thanks Jono.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Field Date to display as words.](https://wordpress.org/support/topic/custom-field-date-to-display-as-words/)
 *  Thread Starter [jonoc73](https://wordpress.org/support/users/jonoc73/)
 * (@jonoc73)
 * [17 years ago](https://wordpress.org/support/topic/custom-field-date-to-display-as-words/#post-1062046)
 * Thanks stwlf but how should I add the F j, Y string into the above code? I assume
   I add it to the echo line but have tried all sorts of combinations but can’t 
   get it to work??

Viewing 9 replies - 1 through 9 (of 9 total)