Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Performance question: "echo get_post_meta" versus "echo do_shortcode"

$
0
0

Hi,

I find myself building custom php templates often. A couple questions:

1. Is there a major performance difference between using the get_post_meta method versus do_shortcode?

Example 1

<?php echo get_post_meta($post->ID,'wpcf-p-year-founded',TRUE)?>

Example 2

<?php echo do_shortcode('[types field="p-stage-focus" separator=", "][/types]') ?>

2. How do I display a custom field array via the first method. It keeps returning the text "Array"

Many thanks!
Jonathan


Viewing all articles
Browse latest Browse all 20145

Trending Articles