Please try as below:
function wp_reservations_shortcode($atts) {
// remove auto paragraphs for shortcode content
remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
ob_start();
?>
<section>
<section class="calendar-header">
<button id="prev-month">Prev</button>
<div class="current-date">July 2024</div>
<button id="next-month">Next</button>
</section>
<section class="calendar-body">
<div class="calendar-weekdays"></div>
<div class="calendar-days"></div>
</section>
</section>
<?php
$html = ob_get_clean();
// Re-enable automatic paragraphs
add_filter('the_content', 'wpautop');
add_filter('the_excerpt', 'wpautop');
return $html;
}
add_shortcode('wp_reservations', 'wp_reservations_shortcode');
Related Posts:
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- to perform the requested action wordpress needs to access your web server. please enter your ftp
- Get plugin directory from a theme
- Recommended eCommerce Plugin for a T-Shirt Sales Business? [closed]
- Rewriting every url
- Redirection Plugin: Redirect all URLs with a regular expression
- Plugin updates are not shown
- How to un-attach rich text editor from named textarea elements
- Post source link plugin – small modification
- How to add users roles dropdown in registration in wordpress
- Which hook callback has priority if both plugin and theme use the same hook?
- Send Data to WordPress from kiosk
- how to not show plugin in admin area
- Memory Leak in plugin action
- delay function on publish?
- Login with email (WP Modal Login)
- How to get CMB2 to show a single image at a specific size
- How to set CORS header?
- How Can A Plugin Hook Itself To the End of Every Excerpt?
- Allow Facebook to preview posts before published
- Getting a 404 when trying to load /wp-admin/plugin-install.php
- custom_list_table edit/delete bulk actions
- How to integrate blog status?
- What plugin will allow me to redirect 404 errors to a specific page?
- add action for displaying posts using a shortcode
- Best way to hook a custom url?
- Changed permalink structure. Need help with redirecting old posts
- Change permalink structure hidden button edit
- How to load plugin after page is loaded – pagespeed issues
- Plugin “WP Attachments” outputs after the_content, how can I best change the location?
- How to Add custom subtitle as og:title to Facebook Open Graph Meta Data in WordPress Themes?
- Theme and plugin install or update display error in localhost
- How can I make use of WP Mobile Detect conditions from within a plugin?
- Is there a plugin-log plugin? [closed]
- LinkedIn Social Wall | Is there a plug-in (Free / Paid) to display a LinkedIn feed in a social wall (not just a feed)?
- jquery not calling php function
- Custom Fields with Pods not being translated
- page loading time of a cached page
- Create custom registration form for WordPress Multisite
- get current date + 90 days and checking every day
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- WordPress plugin creating database in localhost but not on real host
- Add quantity field with each product on shop page-wooCommerce [closed]
- Object method calling for global $wpdb in header.php
- Does a blank plugin come with any overhead?
- Import Instagram post to WordPress blog post
- WP_Query for custom post type and category_id not working
- convert more tag to shortcode
- Why WP_Screeen doesn’t show all options with admin_body_class
- wp_dequeue_script for a Plugin
- What is the purpose of a companion plugin
- WordPress unable to write files in the server
- How to download and unpack / install plugins with templates when installing it
- Featured Image in RSS Feed
- Calling a class method instantiated by ajax call in wordpress [closed]
- WPDeals Add custom currency
- Plugin to redirect all 404 pages to a specific page
- Pagination/404 I believe wp is getting a page ahead of itself
- Which Membership Plugins Allow Registered Users To Bookmark Posts? [closed]
- Disable WP Bakery plugin on specific page
- Error using wordpress functions inside a plugin class
- WordPress 5 boot-sequence / load-order
- Mixed content error after adding SSL certificate
- How to detect 404 url and make this link underline or change background color?
- Meta Key array building with multiple input values from fields
- Failed to load resource: the server responded with a status of 500 () post.php
- Can’t activate and deactivate plugins
- Taxonomy Category Icon on index page
- Is it possible to change plugin’s Admin Panel Url?
- How to add HTML to a template only when user is logged out/ not registered
- admin-ajax.php not working properly on subdomains
- Paid Memberships Pro, Display User Limit
- wp_login_form() ignoring login_form action hook
- Use functionality in third-party plugin in my own plugin
- Redirect loop when forwarding to mobile site
- Force Network Activated Plugin to Run After Site Level Plugins
- I want to add facility to add country, State, City in my custom plugin
- Using Iris Colorpicker on TinyMCE shortcodes page [duplicate]
- WP-Snap too slow (caused by WP_Query?)
- Auto post with filling templates from external data and update periodical
- WordPress Meta Query: Relation is not working correctly
- WordPress ultra slow if I click on posts?
- Variable scope in plugin outside loop [closed]
- Add a filter to a different custom plugin
- Make buddypress posts likes count show to all users [closed]
- Applying a coupon to a single product in woocommerce [closed]
- Can not add jquery in footer
- Allow users to download media files directly from Amazon S3 (AWS plugin)
- Activate and deactivate two plugins automatically at certain hours
- Auto-scroll to beginning of accordion item
- A splash page on landing page
- I cannot login after installing the wp-login timeout setting plugin
- True/False ACF field returning null by default even if default value is true
- Sanitizing, Validating , etc (Plugin)
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- WP galleries in posts after import. How do I do it?
- How can I create a drawable image for a contact form
- My site has only one page, and users access my uploaded mp3 files from there – can I analyze access by song title?