How to use php code inside a div id?
I'm playing around with some PHP in Wordpress. I'm trying to give every
new post title an unique h1 ID, taken from the post name.
So if posting an post named 'Chapter 1', the title should look like
<h1 id="Chapter 1">Chapter 1</h1>
the following code isn't doing the magic
<h1 id="<?php the_title(); ?>"><?php the_title(); ?></h1>
No comments:
Post a Comment