Make sure that ‘Full’ is selected under SSL/TLS settings for the domain in Cloudflare.
All other Cloudflare settings, as of January 2024 at least, should be left as default:
- Automatic HTTPS Rewrites = ON
- Always use HTTPS = OFF
- Brotli = ON
Make sure that ‘Full’ is selected under SSL/TLS settings for the domain in Cloudflare.
All other Cloudflare settings, as of January 2024 at least, should be left as default:
Useful if the FacetWP map is initially hidden on page load and is only shown after some interaction, meaning that the map markers map be shown but too zoomed out otherwise.
$('.map-toggle').on('click', function(e) {
// Apply fitBounds to the Google Map so all markers fit...
FWP_MAP.map.fitBounds(FWP_MAP.bounds);
e.preventDefault();
});
Useful if there’s a commonly used abbreviation on the website e.g. UT, that wouldn’t otherwise be returned in SearchWP results (default word length is three).
<?php
/**
* Reduce SearchWP's minimum character length to 2 (default is 3).
*
* @url https://searchwp.com/documentation/hooks/searchwp-tokens-minimum_length/
*/
add_filter( 'searchwp\tokens\minimum_length', function ( $min ) {
return 2;
} );
<div class="blog-navigation"><?php posts_nav_link( ' ', 'Previous', 'Next' ); ?></div>
.blog-navigation {
display: flex;
justify-content: flex-start;
padding: 1rem 0;
a {
@extend .button;
@extend .button--primary;
}
// Ensures Next button is always right aligned, even when no Previous button
a:last-of-type {
margin-left: auto;
}
}
Otherwise it falls back to echoing another menu (the first?) instead of nothing.
<?= wp_nav_menu( [ 'echo' => false, 'fallback_cb' => false, 'theme_location' => 'footer-2-a' ] ) ?: ''; ?>
Make sure you are not overriding the .facetwp-hidden CSS class.
<?php
$args = [ 'show_in_rest' => true ];
register_post_type( 'post-type-slug', $args );
add_filter( 'yoast_seo_local_cpt_with_front', '__return_false' );
In this example, I’m modifying all the posts with a legacy custom post type that I want to get rid of to use the Yoast SEO: Local custom post type for locations instead.
wp post update $(wp post list --post_type=locations --format=ids) --post_type=wpseo_locations