Categories
CMS Mastering Development Wordpress

Cost efficient way of pre-loading cache on server

So I’ve been struggling with my woocommerce site and its loading time since it has a lot of content the loading time is very slow for anyone to be interested in waiting for it to load. I was told that I should use cache programs like litespeed cache, but the problem is that these services […]

Categories
CMS Mastering Development Wordpress

Why tax_query in WP_Query not working

I am using this code to get all posts under the category (name: ‘Quizes’, slug:’quizes’), which is a customized taxonomy (the slug is st_ai_cat). // the query $term_name = get_query_var(‘taxonomy’); // current taxonomy $cat_name = get_query_var( ‘term’ ); // curent cat name echo $term_name; echo $cat_name; $wp_query = new WP_Query(array(‘post_type’=>’st_ai’, ‘post_status’ => ‘publish’, ‘tax_query’ => […]

Categories
CMS Mastering Development Wordpress

directory structure issue when calling a JS file and Ajax

I can not seem to make the call to the proper JS file location despite trying everything that I can think of. Below is the way that it should be from everything I know to find that "myjsfile.js" (name replaced for stackoverflow) function my_scripts() { wp_enqueue_script( ‘myscript’, get_theme_file_uri( ‘/assets/js/myjsfile.js’ ), array(‘jquery’), null, true ); wp_localize_script(‘myscript’, […]

Categories
CMS Mastering Development Wordpress

Beaver Builder Editor Has Changed Suddenly

I make frequent changes to my website, and have always had excellent success with Beaver Builder because the editor would allow me to essentially see what I was doing (whether it was changing my copy or adding images). Visually, the editor looked like my web page, my copy was the same font, and images were […]

Categories
CMS Mastering Development Wordpress

Custom Woocommerce Product Query

I work on a project that shows some travels (depending on the destination category). I try to sort the travels on the start date (var_confirmed_date) but the result is the same as no sorting. Here is my query: `$args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_value’ => ‘meta_value’, ‘meta_key’ => ‘var_confirmed_date’, ‘order’ => […]

Categories
CMS Mastering Development Wordpress

load content of post with ajax in div

I have a list of posts, if I click title display the post information in a div #post-container. <?php <div class="postsilgle" id="post-container"> <div class="dw-news"> <a href="<?php the_permalink(); ?>"> <h2 class="post_title"><?php the_title() ?></h2> </a> <?php the_excerpt(); ?> </div> </div> <div class="posts-list"> <?php $query_args = array( ‘showposts’ => 10, ‘post_status’ => ‘publish’, ‘cat’ => 15, ); $posts_query […]

Categories
CMS Mastering Development Wordpress

I would like to know how to create a custom add to cart button that only appears when the correct answer to question right [closed]

Hi I need some help creating a custom add to cart button for Woocomerce, where it only appears if a question is answered correctly.

Categories
CMS Mastering Development Wordpress

how to make has_block() see inside blocks too

I am using has_block() to check if post has a specific block type but it does not see blocks inside another blocks, like columns block. So, how to make it find a gallery inside the column?

Categories
CMS Mastering Development Wordpress

Unit testing the output of a function that is hooked to comment_post action

I am writing a unit test for a function that is hooked to the "comment_post" action in a plugin, I set up the basic unit testing code using wp-cli but I am stuck on how to write a unit test that testes the output of this function, I don’t know if I should call the […]

Categories
CMS Mastering Development Wordpress

Hello my Question is about woocommerce plugin wordpress [closed]

I’m working on a project related to a fashion website my client offers variable product where they have different fabric groups like cotton, velvet, etc so the issue I’m facing is I have 3 fabric group each having multiple fabric color when I place an order I have to select 1 from each fabric group […]