Archives: Snippets
Gravity Forms Auto-populate Date
/** * Gravity Wiz // Gravity Forms // Populate Date * * Provides the ability to populate a Date field with a modified date based on the current date or a user-submitted date. * * @version 2.8 * @author David…Continue reading
Update FES Vendor/Seller profile link
add_filter( ‘fes_user_nicename_to_lower’, ‘prefix_fix_vendor_url’, 10, 2 ); /** * Fix the vendor URL for a specific user. * * @param $nicename * @param $user * @return string */ function prefix_fix_vendor_url( $nicename, $user ) { if ( ‘[email protected]’ === $user->user_email ) {…Continue reading
Hilton Snippet
Google Tag
[wpb-random-posts]
$args = array( ‘post_type’ => ‘post’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => 5, );Continue reading
Open All Internal and External Link in New Tab in WordPress
function open_internal_links_in_new_tab() { echo ‘ ‘; } add_action(‘wp_footer’, ‘open_internal_links_in_new_tab’);Continue reading
Pixel Bluue Sleep
Add dynamic copyright year (center) to footer
// This will output “Copyright © 2024” (or the current year) in the footer automatically. $copyright = “Copyright © ” ; $current_year = date( ‘Y’ ) ; $copyright_year = $copyright . $current_year ; // Add CSS classes for styling. For…Continue reading
Add dynamic copyright year
// This will output “Copyright © 2024.” or the current year automatically. $copyright = “Copyright © ” ; $current_year = date( ‘Y’ ) ; $copyright_year = ‘‘ . $copyright . $current_year . ‘.‘ ; echo $copyright_year; // Style in CSS…Continue reading