HTML output from WordPress shortcode is wrapped in unexpected tags

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’, … Read more

How to Remove Default Category Metabox in Custom Post Types

I have approached this situation by using jQuery and CSS (this is code from a project that’s been in production for a few years that I generalized): // Admin Styles function style_custom_taxonomy_admin() { if (is_admin() && $_GET[‘taxonomy’] === ‘TAXONOMY’) { add_action(‘admin_footer’, function() { echo ‘<style>/* Custom admin styles */</style>’; echo ‘<script>jQuery(document).ready(function($){ $(“h2:contains(\”Heading to be hidden\”)”).length.remove(); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)