swiftmed@me.com
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpAhh that now makes sense. Im not that great with code, so I was stabbing in the dark. Either way, thanks very much for your help. It was very much appreciated. 🙂
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpHey, I asked the person who created the theme about it, he made a small modification to the code you gave me, and it worked perfectly.
This is what worked:
$service_used = get_field("service_used"); $service_url = get_field("service_url"); echo '<a href="' . $service_url . '">' . $service_used . '</a>';Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpStill nothing. I honestly don’t get it, as the custom fields show up in the admin, and are filled out (see pic). But the output is not showing up on the front end.
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpThere must be something weird going on with my theme or something. No matter what I do, it’s just not showing up. I know Im editing the right page, as other changes I make to it show up just fine. But nothings showing up with regards to the custom fields.
It ‘should’ be showing up above the Date on the right hand column at the following URL….
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpOK I entered that into my post, but nothings showing up. (Emptied my cache, tried with Firefox, Safari and Chrome).
Heres the code Im using.
single.php:
<? $service_used = get_post_meta(get_the_ID(), 'service_used_field', true); $service_url = get_post_meta(get_the_ID(), 'service_url_field', true); if($service_used && $service_url) : echo '<a href="' . $service_url . '">' . $service_used . '</a>'; endif;?>In the portfolio.php custom post type page that came with my theme…
'service_used' => Array('type' => 'text', 'description' => __('Service', 'themeton'), 'title' => __('Service', 'themeton')), 'service_url' => Array('type' => 'text', 'description' => __('Service URL', 'themeton'), 'title' => __('Service URL', 'themeton')),Can you see anything wrong with that?
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpHey,
Im trying to insert the things into my single.php file, within the loop. The field names are as follows: ‘service_used’ and ‘service_url’
Thanks again. 🙂
Forum: Fixing WordPress
In reply to: Posting and Linking 2 Custom Fields in Template – Please HelpThank you for the reply. To be honest, I’ve already looked at that post, and I don’t really understand what Im looking at, or how I would use the examples. I don’t have a coding background, other than very basic html. Hence, I was hoping someone could show me how / what I need to use.