Hy, i work on a website made with WordPress, Divi and a child theme. I have an header with a navigation and the logo centered on the nav. The header is fine when i’m connected but when i’m not connected (like a visitor) the logo is on display: none and out of the navigation list. The header is gen…
Tag: php
Replace WooCommerce storefront search box for guests by a custom button
On woocommerce storefront header, for not-logged users, I want to replace the search box area with 2 gold bootstrap buttons: “Login”, “Register” (like the stackoverflow landing-page header), to send guests to my customized login/register urls. With your help I have this PHP and CSS sni…
php array, error when filtering array and the value is not present
I’m trying to use isset to check if the $filtered_data returns a set of data. I’m using this code rather than foreach because datasetID is a unique id. My novice understanding is that if (isset($filtered_data)) returns true or false? So the if mrans that if records are returned do x. So, currently…
How to do 301 redirections after WordPress Permalinks change
I changed the Woocommerce permalink structure of my site and I would need some 301 redirections Help. Woocommerce product permalinks were configured according to the structure: And now according to the structure: What lines do I need to add to the .htaccess file to do 301 redirections, please? UPDATE: /shop/%…
How to use get_theme_mod in gutenberg editor wordpress?
In my old WordPress themes (before Gutenberg) I used get_theme_mod to get custom values for certain things in the theme. get_theme_mod( ‘news_custom_headline’ ); Now I would like to use the gutenberg …
How to hide the storefront search box for not logged users?
On woocommerce storefront header, I want to hide the search box for not-logged users, and replace it with 2 yellow buttons: “Login”, “Register” (like the stackoverflow landing-page header) that send to my customized login/register urls. I tried this CSS code that works to hide the sear…
Call a function from a WordPress plugin
I have a wordpress plugin that I’m looking to call one of the functions on a custom template. The function I want to call is get_ship_now_adjust_date_link. Is it possible to just do the following on a …
What is the use of ‘flock’ in PHP [closed]
I am working on Codeigniter 3 for a month, and i want to make my own logging app, that logs the entry of the users and their actions on the website.So i digged deep into the codes related to logging …
How to sort an array based on another value?
So I am pretty lost here because I don’t know what my object looks like (not sure why I can’t do print_r() to print the object). Basically from the below code, I need to sort the reviews which is $_reviews based on $percent_avg. I got the $percent_avg value from a multiple for loops and that’…
Is it possible with only PHP ? PHP FORM
I have a .csv file which contains the name of a product and its quantity separated by a comma. I would like to choose a product from the ComboBox and have its quantity displayed into ‘max’ of my input of numer type . Here is a sample of the .csv file : Here is a sample of my HTML and