Skip to content

Instantly share code, notes, and snippets.

View unwiredtech's full-sized avatar

Patrick Sarmiento unwiredtech

View GitHub Profile
@unwiredtech
unwiredtech / search-metafields.php
Created March 20, 2024 15:53
Adds teh metafield as additional search source for Wordpress Search / JetSmartFilter - Wordpress Search
/* Dev500 - Patrick
* March 19, 2024
* @functions.php
* @page /?s
* Adds teh metafield as additional search source for Wordpress Search / JetSmartFilter - Wordpress Search
*/
// Modify the main WordPress query
function custom_search_filter($query) {
@unwiredtech
unwiredtech / custom-select-arrow.css
Created June 8, 2023 01:36
Custom Select Arrow
.jet-form__field.select-field {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: url(data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%238C98F2'><polygon points='0,0 100,0 50,50'/></svg>) no-repeat;
background-size: 12px;
background-position: calc(100% - 20px) 18px;
background-repeat: no-repeat;
background-color: #fff;
}
jQuery(function() {
// console.log('jQuery initialize')
jQuery.initialize('.elementor-message.elementor-message-success', function() {
//hide the section of the notification
jQuery('#grow-aba-lp-form').hide();
//When changes happened, show the notification
@unwiredtech
unwiredtech / slider-toggle-extracontent.js
Created August 30, 2022 12:16
Extra Content Slides on Click
<style>
section.slide-extra-content{
display: none;
position: absolute;
margin-left: 0;
margin-right: 0;
bottom: 0;
max-width: 92%;
}
@media screen and (max-width:1024px){
@unwiredtech
unwiredtech / scroll-to-top-btn.js
Last active June 8, 2023 01:38
Scroll to Top with auto hide
// hide the topbutton on page load/ready.
jQuery('.scrolltop-btn').hide();
//Check to see if the window is top if not then display button
jQuery(window).scroll(function(){
if (jQuery(this).scrollTop() > 100) {
jQuery('.scrolltop-btn').show().fadeIn();
} else {
jQuery('.scrolltop-btn').fadeOut().hide();
/*
-----------------------
ESP8266 Monitor its Own Battery Level using IoT
-----------------------
Voltage Monitoring in Volts and Percentage
Temperate and Humidity Sensor
*/
@unwiredtech
unwiredtech / arduino-voltage-monitor-12V
Created July 4, 2022 12:48
arduino-voltage-monitor-12V
#include <ESP8266WiFi.h>
String apiKey = "DT5E8MZSXYCUBLMD";
const char* ssid = "yourssid"; // Enter your WiFi Network's SSID
const char* pass = "yourwifipassword"; // Enter your WiFi Network's Password
const char* server = "api.thingspeak.com";
int analogInPin = A0; // Analog input pin
int sensorValue; // Analog Output of Sensor
float calibration = 8.21; // Check Battery voltage using multimeter & add/subtract the value
/* Health Quiz Start */
.fmg-health-quiz_wrapper{
padding: 15px;
background:#fff;
font-family: 'Muli', sans-serif;
}
form.fmg-health-quiz .gf_progressbar_title{
/* Add Class "sticky-header" to the header element */
header.sticky-header {
--header-height: 120px;
--opacity: 1;
--shrink-me: 0.70;
--sticky-background-color: #ffffff;
--transition: .3s ease-in-out;
transition: background-color var(--transition),
background-image var(--transition),
@unwiredtech
unwiredtech / wp-extended-user-info.php
Created February 6, 2019 02:29
Wordpress Extended User Information
<?php
/* Custom user meta */
add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );
function extra_user_profile_fields( $user ) { ?>
<h3><?php _e("Extra profile information", "blank"); ?></h3>