Accept Unlimited Argument In a PHP Function
*** Accepting unlimited argument in a function is a new feature of PHP 7
How To Fix Return Type Of A Function
***Fix the return type of a function in order to avoid errors.
Function Parameter Default Value / Optional Parameter
#Main PHP File #Functions PHP File ***Important Notes: You cannot write the code like this If you give a default value to one parameter, you have to do it for the other one too.
How to change product category thumbnail size in woocommerce
In order to do that we have to call “wp_get_attachment_image_src” function. we can just slightly modify the previous code. ***Display Woocommerce Categories With Thumbnails #MODIFIED CODE EXAMPLE
Show ACF Custom Fields Of A Taxonomy Term
In order to show the custom fields data we have to follow the code example given below. #CODE EXAMPLE
How Append/Concatenation A String In PHP
*In PHP there are two string operators. 1.Concatenation Operator (‘.’) It returns the concatenation of its right and left arguments 2.concatenating assignment operator (‘.=’) It appends the argument on the right side to the argument on the left side #CODE EXAMPLE
Hide Some Product Categories With Custom Query Using ACF
In order to hide some category from a Woocommerce query, we can use ACF to do that. *Let’s get started. Simple query to display product categories with thumbnails. This a simple query to display product categories. #CODE EXAMPLE *Now we have to create a ‘TRUE/FALSE’ custom field in ACF for product category: *It will show […]
Display Woocommerce Categories With Thumbnails
Add this code on your php file or theme file where you wanna show the Woo-commerce product categories with thumbnail. #CODE EXAMPLE
How To Get Image Url From ACF Option Page
Create an Option page from functions.php. Add this code in functions.php file #CODE EXAMPLE ***While creating the image custom field for the Option Page, Your Image Return Format should be set as “Image ID”. Now echo the image url. #CODE EXAMPLE
How To Edit php.ini File IN Google Cloud
1. Go to your project in google cloud platform 2. Then go to Computer Engine-> VM instances -> project name https://i.postimg.cc/8zgbR2zL/google-cloud.png 3. Then Click On SSH https://i.postimg.cc/q7kXY2nR/google-cloud-2.png 4. It will open in this window https://i.postimg.cc/HnprWtYc/gc-3.png 5. Now write these code: Find php.ini file 6. It will show these datas 7. Copy this one: 8. Now […]
Display The Variable Product Price Range In Woocommerce
Main code snippet you can use in product loop. For single product page you can just echo this code
Remove WWW. From Url & Force Https
Add this code to .htaccess file