Note that there are some explanatory texts on larger screens.

plurals
  1. POShortcodes are not working in custom metabox
    text
    copied!<p>I am having issue with WordPress meta boxes. actually I am using WordPress Genesis framework and in child theme I had create few meta boxes for my client to show some content before the page content, but in the custom meta box i am using wp-editor and its working fine. but the issue is that when I try to use some shortcodes in this wp-editor then it won't show me anything, it is just returning the whole shortcode as it is.</p> <p>I am using <a href="https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress" rel="nofollow">https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress</a> for custom meta boxes.</p> <p>And my codes are in <strong>function.php</strong> file:</p> <pre><code>/* -------------------------------------------------------------------------- */ /* Setup Custom metaboxes */ /* -------------------------------------------------------------------------- */ add_action( 'init', 'be_initialize_cmb_meta_boxes', 9999 ); function be_initialize_cmb_meta_boxes() { if ( !class_exists( 'cmb_Meta_Box' ) ) { require_once( CHILD_DIR . '/lib/metabox/init.php' ); } } add_filter( 'cmb_meta_boxes', 'cmb_sample_metaboxes' ); function cmb_sample_metaboxes( array $meta_boxes ) { // Start with an underscore to hide fields from custom fields list $prefix = '_cmb_'; $meta_boxes[] = array( 'id' =&gt; 'text_content', 'title' =&gt; 'Text Content', 'pages' =&gt; array( 'page', ), // Post type 'context' =&gt; 'normal', 'priority' =&gt; 'high', 'show_names' =&gt; true, // Show field names on the left 'fields' =&gt; array( array( 'name' =&gt; 'Custom Content', 'desc' =&gt; 'This is a title description', 'id' =&gt; $prefix . 'custom_content', 'type' =&gt; 'title', ), array( 'name' =&gt; 'Tab Name', 'desc' =&gt; 'Please descibe the tab name (required)', 'id' =&gt; $prefix . 'tab_name', 'type' =&gt; 'text', ), array( 'name' =&gt; 'Test wysiwyg', 'desc' =&gt; 'field description (optional)', 'id' =&gt; $prefix . 'test_wysiwyg', 'type' =&gt; 'wysiwyg', 'options' =&gt; array( 'textarea_rows' =&gt; 5, ), ), ), ); return $meta_boxes; } </code></pre> <p>I save the codes in <strong>page.php</strong> as:</p> <pre><code>add_action('genesis_before_loop', 'ehline_before_loop_content'); function ehline_before_loop_content() { echo genesis_get_custom_field( '_cmb_tab_name' ); echo '&lt;br /&gt;'; echo genesis_get_custom_field( '_cmb_test_wysiwyg' ); } genesis(); </code></pre> <p>But when I use the shortcodes in this meta box it return something like that </p> <pre><code>[wptabtitle] Tab 01[/wptabtitle] [wptabcontent]test[/wptabcontent] </code></pre> <p>Please anyone tell me how can I make it to use shortcodes in the wp-editor.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload