Can part of my WordPress website be headless?

You can mount a react or a vue app partially into a page, so what you ask is theoretically possible but probably not the best solution. You may consider expanding the react application a bit and go fully headless. In this case, next.js (based on react) might be a better solution as it will allow … Read more

is_home doesn’t affect content

You need to is is_front_page() instead of is_home(). is_home() actually refers to the blog page (or the home page if you have it set to show latest posts). is_front_page() refers to the page (regardless of whether it is a static page or a latest posts feed) that sits on the front of your site.

Check if username exist with AJAX

The problem is with your jQuery selector: var usr = $(“#site-addres-input”).attr(‘value’); Will get the default value of the input element. Typically this will be blank, because you’re not setting it ahead of time. You need to use: var usr = $(“#site-addres-input”).val(); I’m also noticing that you’re using #site-addres-input, but “address” has two s at the … Read more

update_user_meta doesn’t work with AJAX

First You can get rid of nasty globals in your AJAX call. I’m not sure what the $st variable that you were output is all about so I’ve excluded, but you can include as you wish – add_action(‘wp_ajax_change_subscription’, ‘change_subscription’); function change_subscription(){ if(!empty($_POST[‘term_id’]) && !empty($_POST[‘type’])) : $user_id = get_current_user_id(); update_user_meta( $user_id, ‘hannit_meta’, ‘My Value’ ); endif; … Read more

query vars in url work but not in ajax call

That’s not the right way to specify data. When you’re using jQuery AJAX, you specify data as an array or an object when passing it in to the method. In your question, it seems like ‘filters_get’ === ‘?actor=x&’ Instead, you should do the following: filters_get = { ‘actor’: ‘x’ }; $.ajax({ url: templatePath + “getmovies.php”, … Read more