7. Category Specific Filter Everything Shortcode

/** * Shortcode [cat_sepc_filter_everything_plugin] für Filter Everything Plugin basierend auf Kategorie. */ function cat_sepc_filter_everything_plugin_function(){ ob_start(); $current_category = get_queried_object(); // Prüfen ob $current_category ein Objekt ist und term_id hat if ( is_object($current_category) && isset($current_category->term_id) ) { if ($current_category->term_id == 268) {…Continue reading

6. Header Top Bar Slider Shortcode

/** * Header Top Bar slider Shortcode [header_top_bar_slider] */ function header_top_bar_slider_shortcodes(){ ob_start();?> Kundenservice: +49 32 214219848 30 Tage Geld-zurück-Garantie Kostenlose Lieferung in 1-2 ArbeitstageContinue reading

4. Blog Slider Shortcode

/** * Blog Slider Shortcode [blog_shortcodes] */ function blog_shortcodes(){ ob_start(); $query = new WP_Query( array( ‘post_type’ => ‘post’ , ‘posts_per_page’ => ’20’) ); $i=1; if ( $query->have_posts() ) : ?>Continue reading

3. ACF Options Pages

/** * Registriert ACF Optionsseiten. */ //ACF OPTIONS PAGE if( function_exists(‘acf_add_options_page’) ) { acf_add_options_page(‘Algemene instellingen’); acf_add_options_page(‘Actieproduct’); acf_add_options_page(‘Actie balk header’); acf_add_options_page(‘Best Selling Products’); }Continue reading

2. Widget Areas Registration

/** * Registriert Footer- und Sidebar-Widget-Bereiche. */ function tutsplus_widgets_init() { // First footer widget area, located in the footer. Empty by default. register_sidebar( array( ‘name’ => __( ‘First Footer Widget Area’, ‘tutsplus’ ), ‘id’ => ‘first-footer-widget-area’, ‘description’ => __( ‘The…Continue reading

5. Product Slider Shortcode

/** * Product Slider Shortcode [product_shortcodes] */ function product_shortcodes(){ ob_start(); $query = new WP_Query( array( ‘post_type’ => ‘product’ , ‘posts_per_page’ => ’30’ , ‘orderby’ => ‘ASC’) ); $i=1; if ( $query->have_posts() ) : ?>Continue reading

Untitled Snippet

function wpb_copyright() { global $wpdb; $copyright_dates = $wpdb->get_results(” SELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate FROM $wpdb->posts WHERE post_status = ‘publish’ “); $output = ”; if($copyright_dates) { $copyright = “© ” . $copyright_dates[0]->firstdate; if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) { $copyright .= ‘-‘…Continue reading