• Hi all, I think I’ve almost got my problem licked – trying to get each post to point to an external link rather than an internal permalink. I’m trying to do this by using the excerpt field as the URL of where I want the title of the post to link – so I’ve used the the_excerpt() method to drop the excerpt into the hyperlink tag on the main template.
    But when I visit the site, it adds a whole bunch of junk to the link – it adds the entire wp installation path, plus surrounds the URL with paragraph tags. Anyway to take these out once and for all?
    Best,
    James

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jbickers

    (@jbickers)

    To clarify a bit: in my chosen example, the excerpt is
    https://www.jamesbickers.com
    The resulting permalink is this:
    https://www.dancingaboutarchitecture.com/wp/%3Cp%3Ehttps://www.jamesbickers.com%3C/p%3E
    I figured that the answer would be in the permalinks page under site options, but it doesn’t appear to be … help!
    James

    Thread Starter jbickers

    (@jbickers)

    Fernando, thanks for the tip. I tried unchecking the “valid XHTML” box, and it’s still not doing what I’m looking for.
    What I’m trying to accomplish is to make entry links point to an external site, without there being a separate page for each entry – i.e., I don’t want there to be a permalink for each entry.
    The two options you suggest, if I’m not wrong, place a link to an external site within the body of an entry. What I want, instead, is for the title of the entry to point to that link. So I’m trying to rewrite the main template to link to that external page in the <div class="post"> section. The trouble is, it’s not only adding paragraph tags, it adds the directory path of the permalink directory at the front, thinking that it’s linking to a local permalink.

    I would just use one of the two methods I suggested and you can remove the title, the title’s link, and permalink from the template.
    I do remember seeing something in one of the functions in the wp-includes folder. Maybe this will spark something for someone else.

    Thread Starter jbickers

    (@jbickers)

    After much ado, I figured out that a function called wpautop needs to be commented out – it appears near the top of template-functions-post.php. Comment this out, and you can easily use the excerpt field to pass URLs to the post.

    excellent, i’m going to have to try this! i too have been wanting to utilize wordpress for newslogging — that is each entry is a synopsis of a news item, with the title linking out to the source article. so much blog software is ill-equipped to deal with this format; i’m hoping i can adapt wordpress to do the job.
    a step further in this direction would be using the custom field for the name of the source website. as i have no experience yet with this feature, i can’t say if/how it will work. presumably i give a shot installing the coffeecode plugin, hacking the index and rss template to add this regularly recurring field, etc.
    ultimately drupal is perhaps better suited –with its flexinode module, and integrate reblogging features– but it is a pain in butt to theme, unlike wordpress which is so-o simple and flexible.
    anyhow if anyone is using wordpress for newslogging –not a just a link portal but a news blog with entries that link out from the headline– please feel free to add your suggestions to this thread:>)

    Hi James,

    I was wondering if you can post a short tutorial on how you solved the problem. I need a function to add links as posts instead of blogroll. Just like Jason does it on https://www.kottke.org These links appear with a short description.

    Did you try using ‘custom fields’ option?

    harshd, around here we call such posts “asides”. Search here on that word and you’ll find a number of ways to do it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘modifying the permalink to point externally’ is closed to new replies.