Open hirasso opened 7 years ago
Hi @hirasso, :smile: Please, use the function remove_all_shortcodes. https://codex.wordpress.org/Function_Reference/remove_all_shortcodes
Thanks
hi @airesvsg, thanks for your quick response! remove_all_shortcodes
is no option though, since the theme needs them installed, and I am getting the data from another url.
ACF's get_field
function supports a third parameter, if you set this to false, no filters are being applied. It would be amazing if you could incorporate this functionality. A quick example:
// my_custom_field_name is a wysiwyg field
get_field('my_custom_field_name', $post_id, false);
....results in a field being fetched from the database without wpautop
, the_content
filters or any shortcodes
applied to it.
I had the same need, but for HTML encoding.
Wordpress returns a "rendered" and "raw" for each field. Is there a way I can use one of the filters to get the "raw" equivalent?
Wordpress core values:
"title": {
"raw": "It's Gneiss",
"rendered": "It’s Gneiss"
},
ACF field:
"acf": {
"description": "<p>Classic pun for geologists and optimists alike. Don’t confuse these mineral types.</p>\n",
I'd like it without the added <p>
and ’
Hi there, love your plugin!!!
One question: is it possible to retrieve a field's
raw
value? I need to get a WYSIWYG-Field, without the shortcodes being converted already – so basically without any filters being applied to it.