PHP code help needed Tabs and Titles
-
I have this in a temple:
<a class="slide-link" href="#tab-<?php the_ID(); ?>">
It shows links on my pages on hover as xxxxx.com/#tab-453
I want it to show the actual post name not the ID.
I tried:
<a class="slide-link" href="#tab-<?php the_ID(); ?><?php echo the_title(); ?>">
But that shows xxxxxx.com/#tab-453 pinotage wine
If I replace the
the_ID
withthe_title
my javascript in the template does not work. How do I code it so javascript uses the tab ID but shows the Page or Post Title as the link?Any help greatly appreciated.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘PHP code help needed Tabs and Titles’ is closed to new replies.