Skip to content

Instantly share code, notes, and snippets.


mark l chaves marklchaves

View GitHub Profile
marklchaves / create_wildcard_domain_cookie.php
Last active Jan 25, 2023
Create a wildcard domain cookie when a Popup Maker popup opens
View create_wildcard_domain_cookie.php
marklchaves / archive.php
Last active Jan 8, 2023
WP ULike Proof of Concept
View archive.php
* Override the theme template for displaying archive pages.
* @link
* @package WordPress
* @subpackage Twenty_Twenty_One
* @since Twenty Twenty-One 1.0
marklchaves / wrapImagesWithLink.js
Created Nov 6, 2022
Wrap images with an a (link) tag
View wrapImagesWithLink.js
marklchaves / set_popup_cookie_on_confirmation.php
Last active Dec 8, 2022
Set Popup Maker Cookie after Form Submission Redirect
View set_popup_cookie_on_confirmation.php
marklchaves / custom_url_contains_condition.php
Last active Sep 30, 2022
Popup Maker Custom Trigger PHP Function for Loading a Popup Based URL contains using the ATC extension
View custom_url_contains_condition.php
<?php // Ignore this first line when copying to your child theme's functions.php file.
* This PHP function will load a popup on a post or page only if the URL
* contains the word "test" in it.
* Usage:
* 1) Install the Popup Maker Advanced Targeting Conditions extension.
* 2) Edit a popup.
* 3) Go to Popup Settings > Targeting.
marklchaves / set_conditional_see_again_cookie.php
Last active Sep 21, 2022
Popup Maker: Manually Set a Conditional Cookie for a Popup
View set_conditional_see_again_cookie.php
marklchaves / force_focus_on_name_field.php
Last active Jul 25, 2022
Force the focus on the name field in a CF7 form
View force_focus_on_name_field.php
<?php // Ignore this first line when copying to your child theme's functions.php file.
/** For testing only. Remove for production. */
:focus {
outline: 3px solid hotpink !important;
<script type="text/javascript">
jQuery(document).ready(function ($) {
marklchaves / disable-popup-maker-woocommerce-archive-page.php
Created Jul 22, 2022
Disable Popup Maker on a Product Archive Page
View disable-popup-maker-woocommerce-archive-page.php
<?php // Ignore this first line when copying to your child theme's functions.php file.
add_action( 'wp', function() {
if ( is_product_category() ) { // echo '<h4>This is an archive page.</h4>';
add_filter ( 'pum_popup_is_loadable', function( $is_loadable ) {
$is_loadable = false;
return $is_loadable;
} );
}, 9 );
marklchaves / popup-maker-content-link-color-override.css
Last active Jul 15, 2022
Use CSS to specifically target only link text color that's inside a Popup Maker popup
View popup-maker-content-link-color-override.css
marklchaves / send_video_link_to_popup.php
Last active Jul 13, 2022
Open a popup that plays a video based on the click open trigger using a query parameter
View send_video_link_to_popup.php