[resolved] Remove link from title? (6 posts)

  1. slamdunksy21
    Posted 11 years ago #

    I want to remove the link from the Title of each post. For example, I want to strip any links from the title, so when I put a link to espn.com in the title, it becomes a hyper link to espn, and not to a detailed view of the post. Any way to do this?

  2. Mark (podz)
    Support Maven
    Posted 11 years ago #

    Not sure how you would do that, but if you did, how could I then view what you had written ?

  3. slamdunksy21
    Posted 11 years ago #

    My main purpose it to show the article (on another site such as ESPN), and have a brief description below it. Here is an example of a site I've seen: http://cuppanews.com Thats exactly how I want it to work where the title links to a completely different site away from my blog. I still want to allow comments and users to read/post comments, but I want the title to link away from the site.

  4. Kafkaesqui

    Posted 11 years ago #

    Since the main question to ask is how do you go about providing the external link, a couple ways to do this are:

    1. Use the excerpt field to insert your link in the post, and replace the_permalink() template tag in your title link with the_excerpt_rss(). Using the_excerpt() would place it in a paragraph tag, whereas the_excerpt_rss() will display it raw.

    The problem with this is it's a hack, and can cause issues elsewhere a post excerpt may be used, such as syndication feeds or archives.

    2. Insert the external link as a custom field, and display the custom field value in place of the_permalink(). You could use a plugin such as Get Custom Field Values to grab the url, or a bit of code like this (assuming the key is 'url'):

    <?php if(get_post_custom_values('url')) {
    foreach(get_post_custom_values('url') as $link) {
    } ?>

    Then use this as the_permalink() replacement:

    <?php echo $link; ?>

  5. slamdunksy21
    Posted 11 years ago #

    Thank You!

  6. bgolat
    Posted 10 years ago #

    how could I have it use normal link to article/post on my page if there is no key defined as url?

Topic Closed

This topic has been closed to new replies.

About this Topic