Skip to content

Instantly share code, notes, and snippets.

View wpbean's full-sized avatar

WpBean wpbean

View GitHub Profile
@wpbean
wpbean / index.html
Created October 13, 2023 09:26
WPB Popup for Contact Form 7: Trigger popup using CSS class and data attributes
<div class="nectar-fancy-box nectar-underline using-img has-animation aspect-4-5 triggered-animation animated-in" data-style="image_above_text_underline" data-border-radius="default" data-animation="fade-in" data-delay="150" data-alignment="left" style="opacity: 1; transform: none;"><div class="image-wrap"><div class="box-bg" style="background-image: url('https://www.arteal.com/wp-content/uploads/2023/10/arteal-colecao-versati-01.webp'); "></div></div>
<div class="text">
<h3 style="text-align: center">Test Popup</h3>
<p style="text-align: center">Elegância e uma estética refinada</p>
</div>
<a target="_blank" href="" class="box-link wpb-pcf-form-fire" data-id="940" data-form_style data-allow_outside_click="1" data-width="500px"></a>
</div>
<div class="divider-wrap height_tablet_20px height_phone_20px " data-alignment="default"><div style="height: 1px;" class="divider"></div></div>
@wpbean
wpbean / style.css
Created January 23, 2021 17:30
WPB WooCommerce Category Slider PRO plain text skin equal height
.wpb-woo-cat-slider.wpb-wcs-content-type-plain_text.owl-carousel .owl-stage{display: flex;}
.wpb-woo-cat-slider.wpb-wcs-content-type-plain_text .wpb-woo-cat-item {
display: flex;
flex: 1 0 auto;
height: 100%;
align-items: center;
}
.wpb-woo-cat-slider.wpb-wcs-content-type-plain_text .wpb-woo-cat-item a {
position: relative;
overflow: hidden;
@wpbean
wpbean / functions.php
Last active June 9, 2020 06:43
WPB Filterable Portfolio custom taxonomy filter
<?php
// Add the code below to your theme functions.php file
add_filter( 'wpb_portfolio_post_args', function( $args, $shortcode_id ){
/**
* $shortcode_id: shortcode generator custom shortcode ID
* For the Elementor use, add the Elementor widget ID
*/
@wpbean
wpbean / functions.php
Last active May 18, 2020 16:05
WooCommerce QuickView LightBox Plugin PRO add Quick View for a category only
<?php
// https://wpbean.com/downloads/woocommerce-lightbox-pro/
/*
Add the following Code on your theme/child-theme functions.php file. Replace the id 64 with your category ID
*/
add_action( 'woocommerce_after_shop_loop_item', 'wpb_wl_add_quick_view_button_for_categories' );
function wpb_wl_add_quick_view_button_for_categories(){
@wpbean
wpbean / functions.php
Last active February 16, 2022 10:37
Remove quiz from LearnPress
<?php
add_filter( 'learn-press/profile-tabs', function($tabs){
unset($tabs['quizzes']);
return $tabs;
});
add_filter( 'lp_quiz_post_type_args', function($args){
$args['show_in_menu'] = false;
return $args;
@wpbean
wpbean / functions.php
Created March 19, 2020 13:10
Reptro Theme: Adding LearnPress profile custom tab for students
<?php
/*
Reptro LMS Theme: https://themeforest.net/item/reptro-online-course-wordpress-theme/21817850
*/
// Add this code on your child theme functions.php file
add_filter( 'learn-press/profile-tabs', 'reptro_learn_press_profile_tabs' );
function reptro_learn_press_profile_tabs( $tabs ){
if( function_exists('LP') ){
@wpbean
wpbean / functions.php
Last active March 14, 2020 07:57
Rising theme, add custom tab with dynamic content. Theme version required: 2.03 or UP.
<?php
/**
* Add custom meta to the course
*/
add_filter( 'rising_course_options', function( $options ){
$options[] = array(
'id' => 'custom_tab',
@wpbean
wpbean / functions.php
Created February 29, 2020 08:12
LearnPress add custom tabs to courses
<?php
/**
* Add Custom Tab
* Add this code to your theme or child theme functions.php file
*/
add_filter( 'learn-press/course-tabs', 'wp_education_course_tab_customize' );
function wp_education_course_tab_customize( $tabs ){
@wpbean
wpbean / functions.php
Last active February 22, 2020 06:59
WPB WooCommerce Related Products Slider - Related Products by Sub categories only
<?php
/**
* Related Products by Sub categories only
*/
add_filter('wpb_wrps_related_products_args', 'wpb_wrps_filter_woocommerce_related_products_args');
function wpb_wrps_filter_woocommerce_related_products_args($args)
{
@wpbean
wpbean / functions.php
Created November 5, 2019 14:08
Add custom post type support for WPB accordion menu and category post
<?php
add_filter( 'wpb_wmca_category_css_class', 'wpb_wmca_add_support_single_doc', 10, 4 );
function wpb_wmca_add_support_single_doc($css_classes, $category, $depth, $args){
if( is_singular( 'docs' ) ){
if ( ! empty( $args['current_category'] ) ) {
if ( $args['current_category'] === $category->term_id ) {
$css_classes[] = 'current-cat';
}