Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Odd Link

On this site the bottom section on the home page - that says 'On Reflection' seems to be picking up a link from else where and links to get-in-touch. I cannot see for the life of me why this is happening - does anyone have any insight for me on this please.

http://www.blueeyed-indev.co.uk/visual/

4 Answers

Graham Davidson that code looks fine, I think it's down to what wordpress is then generating afterwards. I think you will struggle to get it to output in the editor where you wrap links round the divs. So you will need to disable wordpress auto paragraphs and breaks and hopefully that will solve it. Put in your functions.php:

if ( is_page( page_id_here ) ) remove_filter( 'the_content', 'wpautop' );

I think doing something like this may help on a page specific basis, as you wouldn't want that to happen on blog posts. I'm not 100% this will solve your problem but it's what I'm thinking it will be.

Reference links:

Hi Steve McKinney

Thanks for that I took the old fashioned approach - told the client they cannot have CMS on that page for their budget - hard coded it with a Read more link and problem solved ta da!!!!

No problem glad it's solved, that would have been my other suggestion or using advanced custom fields :)

Around line 81 (at least in view source), in the code below you will see it. The closing paragraph after <a href="get-in-touch"> and last line in the code below <p></a><br /> won't be doing you any favours also.

<article class="row-fluid"> <a href="get-in-touch"></p> <div class="span5 offset1 mainText"> <h2>Get In Touch</h2> <p>Interested in learning more? Don’t hesitate to contact me – I’m always happy to help. </p></div> <div class="span5 mainImage"><img class="alignnone size-medium wp-image-77" alt="Welcome" src="http://www.blueeyed-indev.co.uk/visual/wp-content/uploads/2013/06/getSS.png" width="300" height="212" /> </div> <p></a><br /> </article>

Sorry should have mentioned that this is all done through Wordpress hence the odd little <p> in unusual places.

The HTML that I have used in Wordpress can be seen here http://codepen.io/anon/pen/xpoIi