In simple words, this code allows you to show or hide certain items in your WordPress site’s navigation menu based on whether the user is …
Snippets for your wordpress site
Create a coupon programatically in wordpress
This code creates a new coupon with a unique code, a specific amount, and discount type. The $coupon_code variable sets the code for the coupon, …
Stay logged in for a year in woocommerce and wordpress
This code snippet contains two parts. The first part sets a filter on auth_cookie_expiration which is a WordPress filter hook that allows you to modify …
WooCommerce pay Tip option on Checkout
This code is a WooCommerce customization that allows customers to add a tip to their order during checkout. Advantages of the tip option: If youre …
wordpress adjust excerpt length snippet
This code sets the length of the excerpt to 20 words. You can adjust the number 20 to any other value to change the length …
wordpress snippet add login/logout button in header
This code adds a login/logout button to the primary menu of the site. If the user is logged in, the code adds a “Logout” link …
How to add code in wordpress header
To add code to the header of a WordPress site, you can use the wp_head() function, which is a WordPress action hook that is used …
WordPress snippet custom admin login – page Logo
Replace this link ‘https://wpsnippet.club/wp-content/uploads/2023/05/wpsnippetclub-logo.png’ with the url of your custom logo, and upload it to your sites media.
Mobile view not moving left – right full width
This code is commonly used in WordPress sites to ensure that the content within the HTML and body elements does not exceed the width of …