0

I am creating a website for a Fringe Adelaide Venue, we have planned on displaying a gallery on each artist page. We are already using Custom Fields to place some unique content in a Custom Fields widget that we are including on the page.

We have tried to place and execute the gallery shortcode inside of the Custom Fields widget, with no success. We need it to be in the widget so we can position it properly. The theme is Gantry, I am able to change plugins if necessary, but not theme.

I have spent all day yesterday researching a solution and still have not succeeded.

EDIT: The Widget we are using for Custom Fields is Custom Field Widget

Cheers, Thomas

0

You can try to add this filter

<?php
 /**
 * Plugin Name: Shortcodes support for the Custom Fields Widget plugin
 *
 */    
add_filter( 'custom_field_value', 'do_shortcode' );

as a plugin.

This should hopefully make your shortcodes work.

Here you can read more about the WordPress function do_shortcode().

  • Where file should I add this filter to? – Thomas M Oct 18 '13 at 0:59
  • I would add this as a plugin, but you can test it by adding it to the functions.php file in your current theme directory. – birgire Oct 18 '13 at 1:01
  • Brilliant, that works great! I added that code to the plugin first and that worked... – Thomas M Oct 18 '13 at 1:08
  • great to hear that and welcome to WPSE ;-) – birgire Oct 18 '13 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.