On my website’s homepage, I use a chart that counts all Woocommerce reviews. These reviews are shown as a percentage for each rating (1 star, 2 star etc …). I need to change functionality to the total number of ratings for each rating section instead of the percentage and display stars instead of labels. Any advice? Now: Goal: Code of
Tag: wordpress
How to find PHP script (and line) that accessing database
I know there is a way to find php script that send spam from your server, but I have a different issue. I’m having issue with repeating php code that is sending tones of queries to database and I cannot pin point which code does that. I’m not php developer. I would like to somehow get script and code line
Bulk move 20000 post_meta value to wp_content with mysql command
I have more than 1 million Wordpress article, I want to achieve the following effect through mysql: copy the post_meta key value named views to wp_content field. I know how to insert value from table wp_posts to table wp_postmeta, but how to move value from wp_postmeta to wp_posts? I used code like this: but get error messge: ERROR 1054 (42S22):
How to enable output_buffering on wordpress official image
I’m taking my first steps with Docker, specifically with wordpress official image, which is just amazing to use. However, after installing (via docker-compose as below) and checking phpinfo() it appears that output_buffering = 0. I spent the weekend trying to find the best way to expose, or bind to php.ini to set it to on without success. Could I ask
Set up a number of categories to display on a page
I am basically looking for a way to display only 3 categories on my template page. I used a foreach loop to display all the categories on my pages this code displays all the categories on my page but I just want to display 3 per page and eventually add paginations Answer as per my comments above. the code example
Split discount (coupon) row into multiple deducted cost rows in WooCommerce order totals table
If there are 2 discount coupons used, it shows the sum of 2 coupons in the Woocommerce order totals table, while I want to show the deducted cost of each coupon separately. For example, 2 coupons are inserted, currently it shows: coupon : $100 I want to change this to: coupon1(coupon code) : $50 coupon2(coupon code) : $50 Path from
WordPress – Split custom posts into rows and columns
I have a layout where we want to place the custom posts types on alternating rows and 2 & 3 columns. so basically: Any suggestions? Answer This is the code you got your results and its continue as your requirements you can check the screenshot below.. If need any more help drop the comment or message will help..
Globally add code snippet to WordPress PDF links using functions.php
Using functions.php in WordPress, how do I identify all links that contain .pdf (all links to PDF files), ignoring links to other types of files, and then add a bit of code to the element? For example: BEFORE AFTER The added code will be identical for all links. I assume I need some sort of variation on this function: I
wp_after_insert_post not triggering
I am trying to send an email after a new post has been created. It needs to be sent after the creation of the post, because I want to include the post category in the email. wp_after_insert_post does not seem to work, as no email is sent. I have tried using the same code with the publish_post hook instead, which
How to fix php shortcode to show woocommerce download button
I am trying to view the download button belonging to the last order placed by a customer. Basically I have this code. It worked for other things like: displaying the purchase date, order total, product name etc, but it doesn’t work with the downlad. return $last_order->get_downloadable_items(); it shows the word array instead of the download button. Could someone tell me