Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>could you try wrapping wordpresses <a href="http://codex.wordpress.org/Template_Tags/the_title" rel="nofollow noreferrer">the_title();</a> function with <a href="http://php.net/manual/en/function.ucwords.php" rel="nofollow noreferrer">ucwords</a> and <a href="http://php.net/manual/en/function.strtolower.php" rel="nofollow noreferrer">strtolower</a></p> <pre><code>&lt;?php echo ucwords(strtolower(the_title(null, null, false))); ?&gt; </code></pre> <p>From what i can gather this takes the title value uses strtolower to turn it into lowercase, then ucwords to capitalize each word.</p> <p>I haven't tried this myself so i don't know it it works but this is how i would try it.</p> <p>Hope this helps</p> <p><strong>EDIT</strong>: right i've had a look at one of my old files, in your functions.php you could define a function to hook into the save_post action. Using the post variable you should be able to adjust that data, but like others have said you have to be careful incase it doesnt produce the desired effect.</p> <pre><code>add_action('save_post', 'save_postdata'); function save_postdata($post_id) { //edit code here update_post_meta($post_id, 'title', $title); } </code></pre> <p>I'm using the <a href="http://codex.wordpress.org/Function_Reference/update_post_meta" rel="nofollow noreferrer">update_post_meta()</a> function, i'm not entirely sure if this has the ability to edit the title, i don't have to ability to run a test unfortunately.</p> <p>What do you guys think?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload