How do I track which user clicked my button?

Although you can put parameters on a URL link, be really careful about the parameters you use. For example, the other answer suggest using a parameter like this: https://www.example.com/somepage/?userid=12 Using the user ID number isn’t really safe. What is to stop an unscrupulous person to use your link, but another user ID number? Bad things … Read more

How to center all text body in single.php at once?

There is probably some CSS you can add via Additional CSS (in Theme CUstomization) that you could use. Use the Inspector tool of your browser (F12) to see the CSS ‘class’ element used in the content. If the class is called ‘the_content’, then add this to your Additional CSS: .the_content{text-align:center !important;} You might need this, … Read more

Javascript / PHP – closing the loop

Perhaps you could either use admin ajax or the WP REST API to send a request to the server for the user meta update. If you have a look at the WP documentation (links above) or similar questions here on WPSE, you can find examples on how to do it. Update user meta with ajax … Read more

Adding a LISTING of PHP code in a page/post [closed]

You can’t put PHP code in a post, without the use of plugins that allow that. You might be able to put a <code></code> tag around the code in a text editor, but that might depend on your theme. But the code in your question looks like it belongs in the functions.php of your theme … Read more