• Resolved etrader

    (@etrader)


    I want to modify my wordpress NOT to show the comment author’s link. Showing the author’s name but without a link.

    where I need to modify? inside the core wordpress or template?

Viewing 5 replies - 1 through 5 (of 5 total)
  • in your php files you will haev something like:

    <?php the_author() ?>

    or

    <?php the_author_posts_link(); ?>

    replace it with this:

    <?php $author = get_the_author(); echo $author; ?>

    Thread Starter etrader

    (@etrader)

    I still did not get where to do so … in the theme php files? Could you please tell me where on the default theme?

    In the default theme: eg ..\wp-content\themes\default it’s only in the index.php file:

    ...
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    ...

    it’s this line: <?php the_author() ?>

    Thread Starter etrader

    (@etrader)

    I think there is a misunderstanding, I am talking about the url of visitors who leave comments, not the post authors.

    The author of a comment has a link displayed close to the avatar, I want to remove that link, as many people come and leave their links to generate backlinks.

    ah, oops. misread your posts.

    https://techallica.com/remove-link-to-comment-authors-websiteite-from-wordpress-comments/

    that’s handled in the core functions. you could rename the function and call your new function in your comments.php if you don’t want to mess with core files.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing the comment author’s hyperlink’ is closed to new replies.