php - Turn all titles in wordpress powered site into "Capitalized" case -
So I have a question or some tip on how to convert all the titles into the Capital Case on the WordPress-powered website. / P>
I have something like this now:
AAAAA BBBBB CCCCC
I want it to be like this:
Aaaaa BBbbb Ccccc < / P>
I tried googling and searching here, but those tasks are unsuccessful so that any help is greatly appreciated!
Update:
I need to update the header inside the database. just to be clear. :)
There is no function in MySQL for this, but you can create one like this:
drop function, if appropriate; Set global log_bin_trust_function_creators = TRUE; DELIMITER | Make the function proper (SR VARCHAR (128)) Return VARCHAR (128) Deparral CRR (1); DECLARE's VARCHAR (128); DECLARE I INT DEFAULT 1; DECLARE BOOL INT DEFAULT 1; DECLARE punct CHAR (17) DEFAULT '() [] {},.-_! @ :: / '; SET s = LCASE (str); When I & lt; LENGTH (ARR) start from the beginning = substring (S, I, 1); If substitution (c, wing) & gt; 0 then set boole = 1; LEEEEEF BOOL = 1 So if C and gt; = 'A' and C & lt; = Start with 'z' SET s = CONCAT (LEFT (S, I-1), UCAS (C), Sbustring (S, I + 1)); Set boole = 0; End; ELSEIF c & gt; = '0' and c & lt; = '9' then set Bull = 0; end if; End; end if; Set I = I + 1; End; In the end; Returns s; End; | DELIMITER; From
You can easily update and run:
update wp_posts set post_ title = proper (post_title)
Comments
Post a Comment