Add 'in-page' links to wordpress blog posts

Thread Solved

Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Add 'in-page' links to wordpress blog posts

 
0
  #1
Dec 29th, 2008
I'm using a blog hosted at wordpress and for really long posts, I'm trying to add a "cut-the-crap" link to something else in the page.

Now for plain html, I know you can do it with this:
<p>Blah blah blah, this is going to be a long post so you can <a href="#endcrap">skip the crap</a> and avoid a lot of...
...
...
*very long text here*
...
...

<span id="endcrap">Still reading? Good.</span> blah blah blah again.

However, when I try to save the post, wordpress strips the id="endcrap" attributes in my posts. I've 'googled' this already and even in the wordpress forums, all the tutorials are on how to add a link to another post or a link off-site.

Since the blog is hosted at wordpress, I can't change the template so no php hacks allowed. =(

I'm hope someone can help me with this. Thanks!
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Add 'in-page' links to wordpress blog posts

 
0
  #2
Dec 29th, 2008
*I'm hoping --- not I'm hope. =| sorry, I couldn't resist correcting myself.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,315
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 161
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Add 'in-page' links to wordpress blog posts

 
0
  #3
Jan 8th, 2009
Not familiar with wordpress, but try

lots of crap to follow or <a href='#endcrap'>go to the end of the crap</a>
blah blah
blah blah
blah blah
blah blah
<span name='endcrap'>Still reading</span>

works in another hosted site, they disallow id and allow name

or you could use the wordpress --more-- tag and style it so that the page references are
read the crap >> skip the crap
Last edited by almostbob; Jan 8th, 2009 at 9:45 am.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Add 'in-page' links to wordpress blog posts

 
0
  #4
Jan 8th, 2009
It doesn't work either. But thanks anyway.

I can't use the --more-- tag because I've already used it for something else. Funny how something as 'powerful' as wordpress can't even deal with in-page link tags...

I guess it can't be done. They're stripping it intentionally... I'll just install a wordpress blog on my site.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.

Visit this thread
if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Add 'in-page' links to wordpress blog posts

 
0
  #5
Jan 8th, 2009
UPDATE:
Ay... for some reason, they disabled the id attribute for span and cite tags. But using a div tag should work.

For those who have the same problem, use this:
<p>Blah blah blah, this is going to be a long post so you can <a href="#endcrap">skip the crap</a> and avoid a lot of...
...
...
*very long text here*
...
...

<div id="endcrap">Still reading? Good.</div> blah blah blah again.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.

Visit this thread
if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1
Reputation: sciamannikoo is an unknown quantity at this point 
Solved Threads: 0
sciamannikoo sciamannikoo is offline Offline
Newbie Poster

Re: Add 'in-page' links to wordpress blog posts

 
0
  #6
Feb 7th, 2009
[QUOTE=kanaku;766733]

<p>Blah blah blah, this is going to be a long post so you can <a href="#endcrap">skip the crap</a> and avoid a lot of...
...
...
*very long text here*
...
...

<span id="endcrap">Still reading? Good.</span> blah blah blah again.

I would use an anchor/bookmark:

<a name="endcrap"></a>Still reading? Good. blah blah blah again.

This way worked since the first HTML pages where created

From here

The name Attribute

When the name attribute is used, the <a> element defines a named anchor inside a HTML document.

Named anchor are not displayed in any special way. They are invisible to the reader.

Named anchor syntax:

<a name="label">Any content</a>

The link syntax to a named anchor:

<a href="#label">Any content</a>

The # in the href attribute defines a link to a named anchor.
Example:

A named anchor inside an HTML document:

<a name="tips">Useful Tips Section</a>

A link to the Useful Tips Section from the same document:

<a href="#tips">
Jump to the Useful Tips Section</a>

A link to the Useful Tips Section from another document:

<a href="http://www.w3schools.com/html_tutorial.htm#tips">
Jump to the Useful Tips Section</a>
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Existing Scripts Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC