WordPress rewrite rule depend on meta values not ids
WordPress rewrite rule depend on meta values not ids
WordPress rewrite rule depend on meta values not ids
Why is my shortcode not working?
add_action(‘woocommerce_account_wishlist_endpoint’, function() { $wishlists = []; wc_get_template(‘myaccount/my-wishlist.php’, [ ‘wishlists’ => $wishlists ]); });
Add class to image in php
Query on a repeater date (acf)
Found a solution: add_filter( ‘facetwp_preload_url_vars’, function( $url_vars ) { //get the id of the current page $url=”http://” . $_SERVER[ ‘HTTP_HOST’ ] . $_SERVER[ ‘REQUEST_URI’ ]; $current_post_id = url_to_postid( $url ); //get the offer_type (custom field) from the current page id $offer_id = get_field(‘offer_type’, $current_post_id); //returns an id //get the taxonomy slug from the offer_id $term … Read more
static page pagination not working
Would it be a case that it is not possible to disable the Right Click option when loading the original image, by entering its Image address into the Browser? No. You can’t control this. Assuming this is the case, is it possible to prevent the Image from loading when entering the Image Address directly within … Read more
How can i avoid duplicate same post in wp?
after quite some headbanging I managed to make it somehow to work. Here is my code: add_action( ‘woocommerce_cart_calculate_fees’, ‘iom_add_custom_discount’, 10, 1 ); function iom_add_custom_discount( $wc_cart ){ $discount = 0; $product_ids = array(); $product_ids_disc = array(); $item_prices = array(); $in_cart = false; foreach ( $wc_cart->get_cart() as $cart_item_key => $cart_item ) { $cart_product = $cart_item[‘data’]; // here … Read more