define the function:
// my_formatter - register custom text formatter for specified post or page
function my_formatter($content) {
$new_content="";
$pattern_full="{(\[raw\].*?\[/raw\])}is";
$pattern_contents="{\[raw\](.*?)\[/raw\]}is";
$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ($pieces as $piece) {
if (preg_match($pattern_contents, $piece, $matches)) {
$new_content .= $matches[1];
} else {
$new_content .= wptexturize(wpautop($piece));
}
}
return $new_content;
}
Simply add the following code. you should change 100 with your desired page ID.
if ( is_page( 100 ) ){ // you should change this line
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'my_formatter', 99);
}
Related Posts:
- Why isn’t is_page working when I put it in the functions.php file?
- Get the ID of the page a menu item links to?
- Disable visual editor on one specific page
- How can I programmatically create “child” pages on theme activation?
- How to display error messages using WP_Error class?
- Slugs as breadcrumbs for Pages
- Check if has any sidebar active on current page
- Remove Page Title from Static Frontpage
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Breadcrumb how i can display page title with parent > child title with permalink ? any Idea
- Pages should have priority when using add_rewrite_rule
- Enqueuing Script in functions.php vs on the page
- Programmatically set page template based on page ID
- Delete pages and Create default pages for all new network sites
- how to change link of some wordpress pages
- Make menu structure match page heirarchy on page parent change
- Change the slug of a particular page every x hours
- wp_insert_posts keeps adding multiple pages
- How to include local menu based on page id?
- Batch update menu_order attribute alphabetically
- is_account_page() change to page slug
- Don’t delete a page if it holds users
- List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
- Display post shortcode content in the sidebar?
- Why is my page feed returning empty content?
- Functions For Calling Specific Elements
- Get page id or status by private pages?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Enqueue script on every page except one
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- How do I register a new settings page? [closed]
- Only echo Page Content (not page title & page content together)
- get content from page through AJAX
- How to assign php file(template) to several pages with same prefix page name/slug
- Remove the delete link from pages without a plugin
- Change is_front_page() to is_page() to display ‘hero’ on entire site?
- Define an extra field for all pages (with no plugin?)
- Custom field not updating via functions upon publishing
- Using array page name together with page id to deregister script
- How to add a class name to the ancestor of a post?
- How to add an excerpt and read more link to a page?
- My website is generating weired url parameters of paginated pages
- How to change the markup WordPress inserts for post images
- When tax_query used, results disappear (0 =1 produced)
- Targeting specific menu with wp_nav_menu_items
- wp_get_attachment_image returns different image size
- Limit the length of the Author Profile Biographical Text
- disable comments if array exists
- wp_mail not running inside Cron
- Remove product description from product archive page
- Logging in redirects to correct page but shows logged out content until forced refresh
- What is the criteria for pluggable functions?
- How can I stop a function from encoding an entity?
- Theme-Config tab in admin Pannel?
- Display more recent and less recent posts in same category
- Function to “Press Update Button” on all posts
- Change WP attachment name to postid during upload only for post type
- Missing argument 2 for a custom function widgets_init
- How to target only the front page (not subsequent paginated pages) in theme/plugin?
- Get the 5 lastest Featured Posts from a category
- get_post_type() in in_array doesn’t work for some reason
- Is it possible to change any of the HTML/URL returned from the_category()
- Activate small php condition at footer over page template
- How to insert custom widget in custom sidebar in theme activation?
- Replace a menu with widget or a custom template file programmatically
- Which functions/classes are available during SHORTINIT?
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- How to fix get_the_category function returning incorrect slug?
- How to edit the Tags within the image file URLs?
- How to change this simple code so that it sends the email notification after payment in WooCommerce?
- Disable wp_is_mobile()
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 9967617 bytes) in …\wp-includes\functions.php
- How to get post revisions in my custom rest API? [closed]
- Strip div From Excerpt
- How to properly set custom logo size?
- Image Crop Not Working
- WordPress can’t get jquery/unslider to work
- how get number of twitter followers in wordpress
- Unable to use get_page_by_title() more than once per page?
- How to Display WooCommerce Product Price in WooCommerce Archive
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Bizarre Child Menu Issue on WP Site
- large image size of 1440×1440 not pulling 2x of 2880×2880 image
- Its my first time trying to create a website , I got an error Please help
- Drop down list code for sidebar
- Shortcode Initialization in a Custom Theme
- Load scripts into an AJAX div
- restrict uploaded image size and fixed image display size
- Code executes outside of Loop while same code gives ‘Uninitialized string offset’ notice inside a while loop
- Function not receiving string from shortcode
- Restricted images only for logged user. (hidden url)
- WordPress permanently logging users out
- Meta Box value not been pulled in
- Override parent theme function that is not hooked or in the functions.php file
- Syling Custom Fields echo’s from from functions.php
- WP Custom Comment Callback Not Responding
- Shortcodes not outputting in correct divs
- Help finishing script to export WP user data when form submitted
- Add functionality to block comment authors in the Comment edit pag
- WordPress enque the same script causes the setInterval not to work