Get Author Post on author.php with AJAX

Hi I’m trying to display post by author on author.php but I can’t get the author ID. domain.com/author/user_23/ ( display post from that user ) JQuery jQuery(‘#menu_posts’).click(function(){ $.ajax({ type : ‘GET’, url : ‘/wp-admin/admin-ajax.php’, dataType : ‘html’, data : { action: ‘user_posts’ }, success : function(data){ $(‘#user-tab’).html(data); }, error: function(data){ alert(“Error!”); return false; } });…

Gutenberg running code only available in front end within shortcode

In a pre-Gutenberg site, I have a shortcode with roughly the following structure: function generate_new_member_form() { ob_start(); ?> // a form // to generate this form there is some code that uses objects or functions // only available in the front end <?php return ob_get_clean(); } add_shortcode(‘new-member-form’, ‘generate_new_member_form’); For whatever it’s worth, the code has…