Split post title in two different h-tag
-
Hi everyone,
I have a template where the post titles has two words and each word in different h-tag like this: “Hello world” where “Hello is in a h1-tag and world” in a h3-tag. Searching in the forum I found this code to split the title:
<h1><?php echo str_replace(' ','<br />',get_the_title()); ?></h1>
And as you can see I get the title in two lines but still in the same h1-tag.How can i inject the h3-tag to wrap the second word?
thank you for your help!!!!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Split post title in two different h-tag’ is closed to new replies.