Remove 'the_permalink" from posts without a post content (8 posts)

  1. toto
    Posted 10 years ago #

    Hi friends,

    on my category page I have some posts that are only excerpts they dont have a content in post text area.
    But at the excerpt have a permal link to a empty post.

    How can I remove the permal links for only for posts that doesnt have a text content (they have only an excerpt).

    And how can i remove a link read more from posts that doesnt have text content (they are only excerpts).

    Thanks alot for nay help

  2. toto
    Posted 10 years ago #

    any ideas for the problem?

  3. toto
    Posted 10 years ago #

    I have an excerpt for a post, is there a way to remove link in the header of this excerpt. Heed header to be not a link?

    PLS HELP I'm waiting 2 monts for a response...

  4. moshu
    Posted 10 years ago #

    If by header you mean the post title I am afraid the answer is no.
    As far as I know you cannot remove selectively the permalink from titles. In your templates (index, archive etc.) you can remove the anchor for all the posts or you have it for all of them.
    A more knowledgable coder may come up with some solution, but with the default tools and features available in WP you cannot get what you'd like.

  5. toto
    Posted 10 years ago #

    Yeah you are right I mean post title I will asc somebody for plugin


    If somebody can post a plugin - ti will be very good...

  6. toto
    Posted 10 years ago #

    Hey Friends Im waiting 5 monts for solution about this question but ther is no response.

    Its important for me to make the headers of empty posts to be without a permalink in title. Because the post has only excerpt and has no content???

    PLS help - that make my site with WordPress W3C invalid

  7. Buz Carter
    Posted 10 years ago #

    Hey, I just had to do this today -- her's the code:

    foreach($homeposts as $post) {
    echo( "\n<div class=\"post\">" );
    // long way to emit the title link
    if (strlen($post->post_content)<1){
    echo( "\n<h2>" );
    echo( "</h2>" );
    } else {
    echo( "\n<h2><a href=\"" );
    echo( "\" rel=\"bookmark\" title=\"Permanent Link to " );
    echo( "\">" );
    echo( "</h2>" );
    } // if more content

    // next, need the link to more...
    edit_post_link('Edit this entry.', '', '');
    echo( "\n</div><!-- post -->" );
    } // foreach


    Obviously, you'll need to adjust to your usage.

  8. toto
    Posted 10 years ago #

    Thanks carterco :)

Topic Closed

This topic has been closed to new replies.

About this Topic