WordPress.org

Support

Support » Plugins and Hacks » Advanced Custom Field Widget » [Resolved] [Plugin: Advanced Custom Field Widget] Shortcode in Custom Field Possible?

[Resolved] [Plugin: Advanced Custom Field Widget] Shortcode in Custom Field Possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author athenaofdelphi

    @athenaofdelphi

    Hi polins,

    Apologies for the delay in responding… I don’t very often check the forums here.

    I’ve just checked the codebase and it should definitely pass the content through the short code processor. Can you provide more detail, like details of the plugin that provides the shortcode, the shortcode itself etc. so I can look at setting up a test on my development blog.

    If I can reproduce the problem, I should be able to fix it.

    Regards

    Athena

    The sidebar widget displays on pages with the appropriate text in the custom field, but there is an additional error message shown within the widget output:

    Parse error: syntax error, unexpected $end in /home/mydirectory/public_html/mydomain/wp-content/plugins/advanced-custom-field-widget/adv-custom-field-widget.php(566) : eval()’d code on line 1

    This shows up with shortcodes generated by such plugins as “Shortcodes Ultimate” or “Postcontent in Shortcodes”, for example. The error message is the same, regardless of the particular shortcode used. (WP 3.2.1, ACFW version 0.9.9). Thanks!

    Plugin Author athenaofdelphi

    @athenaofdelphi

    Hi polins,

    The problem is the ” characters that can be embedded in the content.

    Depending on how you use the widget, you may be able to fix it by changing this line:-

    eval( '$cvalue="\n<div class=\"advcustomvalue\">\n' . $cvalue . '\n</div>\n";' );

    To:-

    $cvalue="\n<div class=\"advcustomvalue\">\n".$cvalue."\n</div>\n";

    However, you should be aware that this can prevent the replacement of strings like ‘$acfw_content’ in the content generator.

    I can’t offer an updated version of the widget at this time because of the potential for it to break other peoples sites. I have a possible solution, but I just want to be sure it’s going to work.

    Hope this helps until I can provide a more permanent solution.

    Regards

    Athena

    Plugin Author athenaofdelphi

    @athenaofdelphi

    No further comments/actions on this request in about 9 months, so I’m going to mark this thread as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: Advanced Custom Field Widget] Shortcode in Custom Field Possible?’ is closed to new replies.
Skip to toolbar