WPSani
Forum Replies Created
-
Hi,
If you’re still experiencing issues with the GA4 event integration, I built a lightweight alternative that could help you move forward while you continue debugging.
WhatsLink Click Tracker (free on ww.wp.xz.cn) works alongside Joinchat, it doesn’t replace it. It logs every WhatsApp click directly in your WordPress database, including page URL, UTM source, medium, campaign, and referrer. There’s no dependency on GA4, no need for GTM configuration.
It could be a useful backup solution while you sort things out: https://ww.wp.xz.cn/plugins/whatslink-click-tracker/
I printed out $event_ID and it’s correct. It’s the ID of the current post user is visiting.
$event_ID is never an array, because it’s always referred to the current page. It’s a single value.I’m trying to ask ‘between all users, who is subscribed to the current page?’.
I haven’t tried to run a query directly to SQL because I don’t know how to call custom fields from it.Maybe it’s wrong how I update user meta, but I haven’t found another way to store multiple values inside one field.
- This reply was modified 5 years, 4 months ago by WPSani.
Thanks a lot for your reply!
I changed it to$args = array( 'post_type' => 'events', 'meta_query' => array( 'key' => 'signedto', 'value' => $event_ID, 'compare' => 'LIKE', ) );but unfortunately it’s still returning all users without a filter…
EDIT: If I use
get_user_meta($user_id, 'signedto'), I getArray ( [0] => Array ( [1] => 1339 [2] => 1337 ) ). I don’t know if it’s form is correct, whenever a user clicks the subsribe button on a particular event, I use this code to update its field:$signedto = get_user_meta( $user_id, 'signedto', true); if (!is_array($signedto)) { $signedto = array(); } if (!in_array($event_ID, $signedto)) { $size = sizeof($signedto); $size++; $signedto[$size] = $event_ID; update_user_meta($user_id, 'signedto', $signedto); }Forum: Fixing WordPress
In reply to: How to fix WordPress permission error inside Forge Laravel?They confirmed PHP is running as ‘forge’ user, but even if all WordPress’ folders are owned by forge:forge with 755 permissions, that message is still there.
I’m trying to figure out if it’s related to other settings.Thanks a lot @wfdave,
sorry for the stupid question but how can I upload it in nginx folder? I am using SFTP to connect but when I try to upload the file I am having a permission error…Forum: Developing with WordPress
In reply to: How to add a new custom rest url prefix in WordPress?If I use a namespace parameter in register_rest_route(), let’s say:
function test() { register_rest_route( 'api', 'v2', array( 'methods' => 'GET', 'callback' => 'get_info_app', ) ); }I can access api through http://www.mydomain.com/wp-json/api/v2, while I’d need to access it with http://www.mydomain.com/api/v2
Isn’t ‘api’ the namespace parameter in this case?
What am I doing wrong?Also in that website I saw, if I browse to /wp-json I see no custom routes, for this reason I wonder how they added custom routes to another prefix leaving unchanged wp-json
- This reply was modified 6 years, 8 months ago by WPSani.
Forum: Developing with WordPress
In reply to: How to add a new custom rest url prefix in WordPress?I saw a website with http://domain.com/api, how’s that possible?