Output custom field value

I would suggest you could try something like this to insert the Skype id by using get_post_meta: if (get_post_meta($post->ID, ‘Skype_ID’, true) == true) { echo get_post_meta( $post_id, “Skype_ID”, true ); }

Search Results Page – Displaying Custom Meta Fields

You’ve got a missing ) and you’re passing true as a string and not a boolean value. So this line: $pName = get_post_meta($post->ID, $productName, ‘true’; Should in fact be: $pName = get_post_meta($post->ID, $productName, true); In light of your update why not do something like: echo ‘Product Name: ‘. $pName[‘productName’][0]; echo ‘Location: ‘. $pName[‘locationName’][0]; echo ‘Address: … Read more

Can I access Posts of custom-fields via URL?

If you are asking if there is native way then the answer is no. While simpler and older representation of meta queries using meta_key and meta_value would technically fit into URL, they are not registered as public query variables. Even considering registering them as such would be too dangerous in a blanket way, because that … Read more

do_shortcode close

Use get_field instead of the_field. That way you can assign it to a varilable. $first_comment = get_field(‘first_content_block’); $second_comment = get_field(‘second_content_block’); echo do_shortcode(“[vr_jsp] $first_comment, $second_comment [/vr_jsp]”); I haven’t tried it, but see if that works.

Custom field php

Firstly, it isn’t an error, it’s a warning: Warning: Invalid argument supplied for foreach() It’s showing as an error because your PHP is configured that way. Research error logging levels for more details. As for why it’s happening: $my_custom_field = $custom_fields[‘_source_link’]; //key name foreach ( $my_custom_field as $key => $value ) echo $key . ” … Read more