JS Tricks

JS Tricks

If you cannot to use PHP code in footer you can use this simple JS code: Copyright © <span id=”year”>2021</span> BizDirect IT | <a href=”/privacy-policy”>Privacy Policy</a> <script> document.getElementById(“year”).innerHTML = new Date().getFullYear(); </script>  

CSS Tricks

CSS Tricks

Changing autofill input text color and background: /* Change the defaul browser colors */ input::placeholder {   color: red;   font-size: 1.2em; font-style: italic; } input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active{ -webkit-box-shadow: 0 0 0 30px #151515 inset !important; -webkit-text-fill-color: #ffffff !important; } To place a div (with position:absolute;) element in the center of container (with position:relative;): #container {   position:…

Read More Read More

ReHub theme shortcode list

ReHub theme shortcode list

The shortcode list of the ReHub WP theme which you can use in Post or Product content. “Enclosing” shortcode means that the shortcode has a closing tag and you should insert content between tags like [tag]Content[/tag].

WP User Object

WP User Object

To get an user object you can use this function: $user_id = 14; $user = get_user_by( ‘id’, $user_id ); where the first parameter can be: id | ID | slug | email | login of the user, and second: real user ID, slug, email address, or login name. // value of $user WP_User Object (…

Read More Read More

Useful WordPress SQL queries

Useful WordPress SQL queries

The best Database Editor is phpMyAdmin as for me. It is very simple and comfortable. To run SQL queries below on database choose a required database in the left sidebar and open SQL tab in the top of the right window. How to remove all posts with a custom ‘post type’ and their meta fields…

Read More Read More

WP Comment Object

WP Comment Object

WP_Comment Object ( [comment_ID] => 5 [comment_post_ID] => 1665 [comment_author] => webbizdirect@gmail.com [comment_author_email] => webbizdirect@gmail.com [comment_author_url] => [comment_author_IP] => 192.168.42.7 [comment_date] => 2020-01-17 13:49:26 [comment_date_gmt] => 2020-01-17 13:49:26 [comment_content] => Zodra er een enquête beschikbaar is die bij jou past, ontvang je een e-mail. Je kunt dan zelf bepalen of je die enquête wel of…

Read More Read More

Modifying the WooCommerce Product Query

Modifying the WooCommerce Product Query

WooCommerce builds a custom query for products in its WC_Query class by hooking into the classic pre_get_posts hook and changing WordPress’s query parameters to get the desired products. WooCommerce then removes itself from the query afterward. I am not 100% sure of why, but I presume there is a good reason. It might be running in WooCommerce, but it…

Read More Read More