How can I automatically add random description to posts with empty content posted to WordPress?

I would like to automate the process of adding descriptions for articles published on my site. I would like to automatically insert a random description from a list of pre-edited (Advanced Custom …

How to send an array of categories and posts in wordpress functions.php?

I make a request to my custom endpoint function in functions.php : add_action( ‘rest_api_init’, function () { register_rest_route( ‘wp/v2’, ‘/homepage/’, array( ‘methods’ => ‘GET’, …

output the_field of related posts with ACF Relationship

and first off all, thanks for help. I have to following code to display related posts from one custom post type to another with ACF Relationships. what i want to know, is it possible and how can i …

PHP weird curly brace syntax?

Does anyone know if PHP has an alternate curly brace syntax? I’ve come across a PHP file with a weird syntax I’ve never seen before. It’s being used in a Wordpress theme. Here’s an example of the …

WooCommerce: Set country by default in checkout page for unlogged users

How to make the country default for regular (unregistered users). But if the buyer has a personal account and entered the country there, he would not be thrown into default in checkout? I have tried …

WooCommerce – removing country field from my-account page prevents from saving address

I sell and ship products only to one country so I don’t want to display billing_country and shipping_country field to the customers. I removed the fields from both checkout and my-account addresses …

Custom shipping rates programmatically in Woocommerce

I Want to calculate custom shipping rates based on cart amount for woocommerce, My requirement as follows, Cart amount 0-10 => £4.99 (shipping_rate_id = flat_rate:12), 10-20 => £3.99 (…

WordPress the_permalink() closes tag?

Hellow, im trying to code a custom theme for my wordpress site. im trying to output 5 of my posts and i want to wrap them into a link. however when i foreach() through the posts and want to wrap my …

WordPress site hacked redirect

i have a wordpress website and i saw that when i try to view the source code with chrome its show me this (look at the code): so i search it in my files and found a file called lt_ that has that …

Hot to add subcategories under category element in woocommerce flatsome theme WordPress

I’m trying to set up e-commerce website. Ran into a problem with Categories element. I want the element to represent not only categories, but also subcategories below itself. I also cannot edit page …