Website Title Not Showing in Browser Tab / Title Tag Empty in Page Source

It looks like your header.php is using wp_title(”), which is deprecated and may not return anything in some cases. Also, the way it’s structured, it’s not properly appending the site title. Try replacing your <title> tag with the following code: <title><?php bloginfo(‘name’); ?><?php wp_title(‘|’, true, ‘left’); ?></title> Or, if you’re using a newer version of … Read more

How can I process a form submission from an HTTP POST request?

you can use admin-post.php to process the form. you can set the form like that : <form action=”<?= htmlspecialchars(admin_url(“admin-post.php?action=MY_PLUGIN__my_action”))?>” method=”POST” > <button name=”send”>go</button> </form> and then you link the code with that : add_action(“admin_init”, function () { if ( !isset($_GET[“action”]) || (“MY_PLUGIN__my_action” !== $_GET[“action”]) ) { return; } /* */ // debug var_export($_POST); exit(); /* … Read more

Function to filter numbers from string

You could use PHP’s preg_replace() to wrap all the numbers (ie, any successive combination of 0 through 9) in a <span> tag. add_filter( ‘the_content’, ‘wpse426625_number_wrapper’ ); /** * Wraps any number in the content in a <span> tag. * * @param string $content The post content. * @return string The content with the numbers wrapped … Read more

Get variable from url

There were actually 2 issues. First, I had to use get_query_var. Secondly, for some reason Permalinks were set to a weird custom structure. It’s working now.

How to use Javascript to get data from a WordPress form

This approach should work, Modify it for your use case. //JQuery Code jQuery( document ).on( ‘change’, ‘.from-this’, function( e ) { e.preventDefault(); jQuery( ‘.change-this’ ).text( this.value ); } ) HTML Code: <input type=”search” class=”from-this” /> <div class=”change-this”></div>