October 26, 200817 yr I'm following a tutorial for custom coding a wordpress theme. The current part I am on is where you place a cursor over a post title link and a description pops up. Code is <h2><a href=”<?php the_permalink(); ?>“ title=”<?php the_title(); ?>”> <?php the_title(); ?></a></h2> Have I made a mistake? because only the first word of the title pops up instead of the whole title. Cheers....... A very razzed off Helen.
October 26, 200817 yr We would need a lot more to work with than just that to figure out what your error is! Check the HTML source and see if the title is only the first word there, or if the whole phrase is there. If its the former, then its a php error, latter, an html/browser error.
October 27, 200817 yr In your description you probobally have quotations, view the source of your page and check to see what all is in your a tag. Try this, it will probobally add slashes to every quotation though. <h2><a href="<?php the_permalink(); ?>" title="<?=addslashes(the_title(); ?>"> <?php the_title(); ?></a></h2>
Create an account or sign in to comment