strip_tags()
is not bad, but there may be a lot of tags you’ll have to allow. So maybe you can use str_replace()
to only get rid of the <p>
-tag:
<?php
$field = get_field('wysiwyg'); // your wysiwyg field data
$strip = array('<p>','</p>'); // search for <p>
echo str_replace($strip,'',$field);
?>
Related Posts:
- Remove headings option from Wysiwyg editor from ACF in a certain custom post type
- ACF Wysiwyg Editor Image srcset for responsive images [closed]
- TinyMCE’s “Clear Formatting” button doesn’t remove lists and headings
- update_post_meta and update_field ony working when saving the post
- WP REST API: Order posts by meta value (acf)?
- Get the label from ACF checkbox [closed]
- How to update a custom post title from a front-end form using ACF fields?
- Qtranslate + Advanced Custom Fields: how to have a multilanguage wysiwyg editor? [closed]
- Using meta_query and custom fields within pre_get_posts to return posts within a numerical range
- Set default date in datepicker of an advanced custom field
- Query pages for use of a flexible content layout
- ACF get field label in custom code
- ACF repeater field with meta_query
- sort by date in Advanced Custom Field
- How to customize a divs background dynamically using Advanced Custom Fields Plugin?
- ACF if / else checkbox [closed]
- Post Object field orderby (Advanced Custom Field)
- ACF Plugin – Random Gallery Image with wp_get_attachment_image()
- Sorting custom admin column by value
- ACF Custom validation message not showing up
- Is it safe and good practice to use do_shortcode to escape?
- Post edit – Media Library – Only get images from current post
- Output comma with get_field in Advanced Custom Fields [closed]
- Gutenberg on an ACF options page
- Update post meta value as date difference between two fields
- Problem with using custom shortcode with ACF WYSIWYG field
- Changing a specific value inside a complex repeater/flexible content field (ACF)
- get all posts in custom post type by ACF field value
- Wrap Gutenberg blocks both frontend/backend (PHP approach with ACF)
- change value of fields created with advanced custom fields in the front
- How to filter get_post with ACF by a checkbox field?
- Get posts with multiple meta values
- Advanced Custom Fields Plugin: Get file URL into Parent
- html element to separate php variable strings – ACF datepicker
- ACF relationship field outputting unpublished content [closed]
- Show only the future event (Advanced Custom Fields)
- Can’t get “has_sub_field()” to work in a conditional [closed]
- If/Else Statement for Advanced Custom Fields
- Search and replace not working for ACF Images
- How Do I Use a ACF Custom Field To Add A Slider ID?
- Override not echoing my string or dom element
- ACF relationship fields ‘The results could not be loaded’
- Hidden field in acf
- How to show Advanced Custom Fields data above share links, pagination, etc
- How do I ensure the social icons appear on all pages? [closed]
- Strip comma from last element in concatenated JSON string
- How can you query posts by advance custom field when the value is a serialized array? [closed]
- How to get file upload value in front-end to put in ACF image field
- Query by radio button ACF
- Sorting the portfolio by an ACF? [closed]
- How to change the background color of my header dynamically based on a Custom Posts types color value?
- Advanced Custom Fields – category image
- ACF: Update field value based on value of another field
- Prevent other hooks from firing after wp_update_post() outside of editor
- Can I use WP blocks in a template?
- Set post publish date by custom field
- Use Acf Repeater data as options for a different acf custom select field
- Where to place CSS if add a new layout to FLexible Content Template
- ACF get group fields from current post taxonomy
- Explore custom posts (CPT UI & ACF) database from WP UI
- Transitioning Laravel App into WordPress (Portfolio Website)
- get the title of a relationship field
- Images are broken in Wysiwyg Editor – ACF backend
- How to call ACF field in functions?
- Creating permissions rules with ACF repeater field
- Multiple orderby date arguments
- Create Shortcode for php code in functions.php
- ACF: Updating gallery field doesn’t work in backend
- How to pass get images in homepage also in portfolio page?
- Pulling author name via $_GET parameter
- Srcset incorrect with Owl Carousel and ACF?
- Rearranging Content After Blog Post
- ACF order relationship by date
- Advanced Custom Fields – Google Map Won’t Render Unless Variable Dumped
- Call the cropped image of a custom field in the theme
- How to create an ACF shortcode with Repeater Field in WordPress functions.php?
- Generate custom sized images from certain images in media library
- Relationship field problem: Uninitialized string offset: 0 in
- How to use an ACF taxonomy relationship field as part of the URL structure for a custom post type?
- ACF iterating past the while-loop, defining a max number to loop
- wp_insert_post with advanced custum fields repeater
- Only list category if it has a custom field image
- Displaying page list and a custom field
- Gettext for custom field checkbox values
- How to add admin functionality to allow ability to choose different field group to display on webpage using Advanced Custom Fields?
- Separate [Advanced Custom Field] values by commas
- Time sort with meta_key using UNIX timestamp failing due to date differences
- Advanced custom fields – If/ while field problem
- How not to strip leading zero in advanced custom fields
- ACF orderby not sorting dates correctly [closed]
- update_field() with repeater fields issue [closed]
- Advanced Custom Fields Image Crop
- Display ACF field only if value is greater than 0
- How do I convert an ACF field from a string to an integer?
- How can i get custom field to apear on my wordpress admin area (post_type)
- How to use ACF repeater? [closed]
- Updating post object via ACF breaks front-end
- Custom headings on WYSIWYGs per flexible content module in ACF
- Same ACF Relationship field for multiple Post Options sub-pages?
- Pending posts showing category until published