Jump to content
Sign in to follow this  
admin_nd

link banner titles to pages

Recommended Posts

admin_nd

I want to hyperlink my banner titles to pages. I used

TITLETEXT[/code]

which works but it's repeating the actual text of the link below the banner image. How can I fix that?

Share this post


Link to post
Share on other sites
admin_nd

www.shematters.me I'm linking to a page on the main menu.

Share this post


Link to post
Share on other sites
kastelic

You can't put a hyper link in a title tag or alt tag. You need to wrap the anchor tag around the image like this: ' whatever ' After you've added your image go into html mode and add the anchor tag, or go into the image editor and type in your page in the "image link url" field.

Share this post


Link to post
Share on other sites
kastelic

Sorry the code for that example got messed up. Here it is:

	`
	 
	`
	[/code]

Share this post


Link to post
Share on other sites
admin_nd

Not sure I get your solution. The titles in question are inside banners, so the image is not available in the html section. ???

Share this post


Link to post
Share on other sites
kastelic

Okay, well you can wrap the anchor tags around your title as well. Right in the Title field put: `

	 Your Title 
	
	[/code]

`

Share this post


Link to post
Share on other sites
admin_nd

That's what I did. And it worked EXCEPT parts of the code appeared underneath the images in each banner - kind of like a caption but not aligned or anything. How can I keep that from showing up?

Share this post


Link to post
Share on other sites
Guest Guest

What page on your site are you using the banners on? Maybe if I see it I'll get a better idea of the issue. Also, can you post exactly how you did the link text?

Share this post


Link to post
Share on other sites
catrina

Can you copy and paste the actual text/code? I see that extra

" />

but it's difficult to figure out how it can be removed without seeing the code...


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
admin_nd

Sorry, I guess I don't know how to add code to the forum. I used the pattern: (replacing brackets with >s) [a href="LINK">TITLE</a]

Share this post


Link to post
Share on other sites
cmunns

When I check the source I see this for the title: `

Projects: Home Improvement for My Soul

` that semi-colon shouldn't be there. Also, for some reason the alt text for you image is actually a link tag and that's why you're having problems with extra code on the page. `<!--url{0}-->`

Share this post


Link to post
Share on other sites
admin_nd

The image was downloaded from the internet to my harddrive. That's where I uploaded it from. To clear that up, I removed the image causing the problem, clicked update within the banner input box, and clicked update on the page. Then I renamed the picture file and reloaded it in the dashboard view. I also removed the semicolon from the title. But, the extra text is still showing up on the website. ??? (I didn't work through the editor at all, just the banner input box.)

Share this post


Link to post
Share on other sites
cmunns

What is the file name that you uploaded? It's only happening on that one banner so it can't be a bug.

Share this post


Link to post
Share on other sites
admin_nd

I took the link it off the other three banners until the problem was resolved. It happened on all three banners.i

Share this post


Link to post
Share on other sites
bryan-hadaway

Marking for further developer help. Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

Nancy, I just don't understand. You still have three images and only one shows the markup that shouldn't be there. If you want email me adam [at] pagelines.com I'll try and take a look to see what's going wrong.

Share this post


Link to post
Share on other sites
cmunns

Okay so the problem is this line in the section.banners.php file ` $banner_media = ''.get_the_title().''; ` You can see the alt tag for the image pulls the title so that when there is HTML in the title it throws it off and outputs a portion of it to the screen. change the `get_the_title()` function to `strip_tags(get_the_title())` and that should fix it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×