I create a module for elementor. I need to display the author name, choosen from the elementor admin control. I have 4 administrator. They show up correctly on control panel: admin (ID=0.) Jhon Doe (ID=1.) Jeane Doe (ID=3.) Mary Doe (ID=5.) The code for Elementor admin panel: When I choose Jeane Doe from Elem…
c# posting to PHP working on localhost, but not on production server
I need to post a username and a password, to a server to validate it, then return a true or false. This is fully working on my local machine, but when I try it on the production server, it is not receiveing the POST values (it is returning the “noPOST” back to the c# code). C# code: PHP Code: [EDI…
WooCommerce custom localization address format for specific country
I am printing address labels from WooCommerce and find that the line breaks for the addresses are not as I need them. I found the code I need to change in woocommerce_localisation_address_formats hook and have added the line break but I do not know enough to add the correct code to the functions file thus avo…
Can’t perform a PHP POST request on mysql database
I’m struggling into do my first API in php and I’m facing some problems with a simple POST request. I’ve searched almost everywhere for some alternatives to my code, but it seems to be ok. Can you guys check it for me the last time? Thank you! method: create.php: Answer ok, so I managed to r…
Get tag slugs from wp post that begin with specific letters then use them in a qp_query
I am trying to create a list of tags that I can use in an array within a wordpress wp_query. I’ve made the tags appear in the template (via echo) so I know I have the output, but I don’t know how to move/use the output from this into the array of the separate wp_query. I normally can find out
WordPress incorret password for username or email, added using “wp_insert_user”
So i have created my own user, using below code. I am more than certain that i have a correct password when i login. But for some reason that I dont know i always have “The password you entered for the email address/username is incorrect”. Can someone shed some light on me!!! P.S I confirm that my…
nginx return file not found with nginx-proxy and doesn’t load static files
I’m using nginx-proxy-automation to run my php application which is written using CodeIgniter 4 and the app structure is the following: the index.php file is available inside the public folder. The docker-compose.yml of php-application contains the following stuff: Inside the php-application/docker-comp…
how to create associative array from NOAA data
I’m trying to convert this to an associative array with json_decode but I’m messing up somewhere. $noaaRaw looks like: How do I convert that to an associative array? Answer file returns an array of lines. You want to use file_get_contents to get a string to decode: It is also possible after that, …
Replacing part of string with prefix and suffix
I want to make it Texts to replace with is with in braces () or [] and can be found from Table 1 or Table 2. Current approach How to improve the code to skip not-required loop ? Answer There may be a way with one loop that I’ll think on, but since the arrays have the same keys they
Basic Auth Send API_KEY to php api – REACTJS
I am sending the username and password to the PHP api with the API_KEY in the .env file. How do I get the user name before the semicolon as the password after the comma in Api? I could not run it with the current code I wrote. I’m using basic auth .env REACT CODE PHP Answer You can either write: