Archives: Snippets
WordPress Trending Posts | Popular Posts Ticker Shortcode
/* Showcase your trending content with this scrolling WordPress ticker. Shortcode: [trending_postss count=5] Can change count as per your needs. Note: This shortcode requires the “Post Views Count | Post Views Tracking with Shortcode and Admin Column” snippet to be…Continue reading
Post Views Count | Post Views Tracking with Shortcode and Admin Column
/* Description: Enhance your WordPress site with a post view tracking system. This snippet uses a one-hour cookie to avoid inflating counts, offers a get_post_views() function for developers, a [post_views] shortcode for users, and adds a sortable “Views” column to…Continue reading
Vacatures CPT – zonder taxonomies
Search Filter by Genre and Artist
add_action( ‘pre_get_posts’, ‘softcomplexmusic_custom_search_filter’ ); function softcomplexmusic_custom_search_filter( $query ) { if ( !is_admin() && $query->is_main_query() && $query->is_search ) { $tax_query = []; if ( !empty($_GET[‘genre’]) ) { $tax_query[] = array( ‘taxonomy’ => ‘genre’, // Ensure this matches your site’s taxonomy slug…Continue reading
Connect site to Google
Customizing Checkbox and Radio Fields to Look Like Buttons (All Forms)
.wpforms-container input[type=radio], .wpforms-container input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;} .wpforms-container input[type=radio] + label, .wpforms-container input[type=checkbox] + label { padding: 5px 10px !important; background-color:…Continue reading
Customizing Checkbox and Radio Fields to Look Like Buttons (Specific Forms)
.wpforms-container form#wpforms-form-1000 input[type=radio], .wpforms-container form#wpforms-form-1000 input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .wpforms-container form#wpforms-form-1000 input[type=radio] + label, .wpforms-container form#wpforms-form-1000 input[type=checkbox] + label {…Continue reading
Translating the Total Field’s Order Summary
add_action(‘wpforms_wp_footer_end’, function () { ?>Continue reading
Dynamically Setting Stripe Payment Description in WPForms
/** * Dynamically set Stripe payment description to include the current page/post title. * * @link https://wpforms.com/developers/ * * @param array $form_data Form data and settings. * @param array $entry Entry data. * * @return array */ function wpf_dev_process_form_data( $form_data,…Continue reading