0

I want to remove the link from the date, this link leads to archiving. I'd be happy to get help - thank you very much

Attached picture

1

I don't know which theme your are using, I am explaining you same thing for twenty seventeen theme, go to wp-content\themes\twentyseventeen\inc\template-tags.php,

You will find function twentyseventeen_time_link() there. In this function you will get code as like

return sprintf(
        /* translators: %s: post date */
    __( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
            '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
        );

Remove 'a' tag and it will become as like

return sprintf(
        /* translators: %s: post date */
        __( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
         $time_string
    );

In your theme may be similar code with some other function name, search and do same. Hope it will help you.

Thanks

0

In my template it does not exist, I went to a single.php file I think I found something similar, I'll copy the code here

<div class="entry-meta">
                        <?php if ( po_single_metadata_show( 'author' ) ) : ?>
                            <span class="entry-user vcard author"><?php echo get_avatar( get_the_author_meta( 'email' ), '24' ); ?> <?php the_author_link(); ?></span>
                        <?php endif; ?>
                        <?php if ( po_single_metadata_show( 'date' ) ) : ?>
                            <span><time datetime="<?php the_time('o-m-d'); ?>" class="entry-date date published updated"><a href="<?php echo get_month_link( get_the_time('Y'), get_the_time('m') ); ?>"><?php echo get_the_date(); ?></a></time></span>
                        <?php endif; ?>
                        <?php if ( po_single_metadata_show( 'time' ) ) : ?>
                            <span class="entry-time"><?php echo get_the_time(); ?></span>
                        <?php endif; ?>
                        <?php if ( po_single_metadata_show( 'comments' ) ) : ?>
                            <span class="entry-comment"><?php comments_popup_link( __( 'No Comments', 'pojo' ), __( 'One Comment', 'pojo' ), __( '% Comments', 'pojo' ), 'comments' ); ?></span>
                        <?php endif; ?>
                    </div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.