Skip to content

Instantly share code, notes, and snippets.

$argsref = array(
'post_type' => 'referenz',
'posts_per_page' => -1,
'meta_query' => array(
'key' => 'kp_referenz_featured', //checkbox created with acf
'value' => '1' // check if true
)
);
// check original function befor override
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
add_action( 'woocommerce_shop_loop_item_title', 'add_custom_title', 10);
function add_custom_title() {
echo '<h2 class="woocommerce-loop-product__title">'.str_replace('ß', 'ss', get_the_title()).'</h2>';
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#myElement {
/* Enter your style code */
}
}
$blogcat = get_terms('cl-post-tax');
// Always show link in WP backend on custom post type or posts category
(example: https://clevis.sunlime.io/wp-admin/edit-tags.php?taxonomy=cl-post-tax&post_type=cl-post)
...
if($the_query->have_posts()) :
echo '<div class="category-filter">';
<?php echo get_stylesheet_directory_uri(); ?>/assets/img/favicon.ico"
//http://jsfiddle.net/RokoCB/tw6g2oeu/7/
(function($, win) {
$.fn.inViewport = function(cb) {
return this.each(function(i,el){
function visPx(){
var H = $(this).height(),
r = el.getBoundingClientRect(), t=r.top, b=r.bottom;
return cb.call(el, Math.max(0, t>0? H-t : (b<H?b:H)));
} visPx();
// get page ID with objct post
$custompageid = get_field('anfrageseite_id', 'option'); // 'options' is standard value!!!
// Register Sidebar
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Header-Hero', 'alle_sprachen' ),
'id' => 'header_hero',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
// register sidebar in functions
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'alle_sprachen' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
@ABooooo
ABooooo / addingwidgets
Created January 9, 2019 14:50
Dynamically Adding Four Footer Widget Areas
https://code.tutsplus.com/tutorials/dynamically-adding-four-footer-widget-areas--cms-22168