Archives: Snippets
Minimal WordPress Search
add_filter( ‘post_search_columns’, function( $columns ) { return [ ‘post_title’ ]; } );Continue reading
Kitchen Renovation Estimator Edmonton
(function(){ /* ===== Gravity Forms settings: replace the numbers with your form and field IDs ===== */ var JKR_GF={ formId: 0, /* e.g. 7 */ fields:{ /* Hidden field IDs from the form editor */ home:0, scope:0, budget:0, contingency:0, total:0,…Continue reading
Mãe que inspira pixel
Terraform file
terraform { required_providers { stripe = { source = “stripe/stripe” version = “0.1.3” } } } provider “stripe” { # API key is read from STRIPE_API_KEY environment variable # Alternatively, set it explicitly (not recommended for production) # api_key =…Continue reading
Meta Pixel Code
Minimal Login Form
// Hide Login Errors add_filter( ‘login_errors’, function ( $error ) { // Customize the Message return ‘Something is wrong!’; } ); // Remove Login Links add_action( ‘login_head’, ‘remove_login_links’ ); function remove_login_links() { add_filter( ‘login_site_html_link’, ‘__return_empty_string’ ); // Back to Link…Continue reading
Back to Top JS
document.addEventListener(“DOMContentLoaded”, function() { var btn = document.getElementById(“back-to-top”); window.addEventListener(“scroll”, function() { if (window.scrollY > 300) { btn.style.display = “block”; } else { btn.style.display = “none”; } }); btn.addEventListener(“click”, function(e) { e.preventDefault(); window.scrollTo({ top: 0, behavior: “smooth” }); }); });Continue reading
Back to Top HTML
Back to Top CSS
.back-to-top { position: fixed; bottom: 20px; right: 20px; background-color: ivory; opacity: .75; font-weight: bold; font-size: 1rem; text-transform: uppercase; padding: 5px 10px; border: 1px solid; border-radius: 50%; text-decoration: none; display: none; /* Hidden by default */ z-index: 99; }Continue reading