Remove author name and publish date
-
How do you remove the Author Name and publish date from a page?
-
Hi @johnstiles.
Can you tell us which version of our theme you are using?
Also, can you share screenshots?
Thanks you.
Hello.
I have version 1.2.4.
I installed a plugin to remove titles but it only did it partially. The top of each page still says “By / / NO COMMENTS”
Sorry I don’t see how to upload an screen shot but if you provide an email address I can send it over.
Hi @johnstiles.
You can send screenshots to [email protected].
Since Coffee Shop: Cafe is a child theme of Ecommerce Modern Store, you need to modify the parent theme files. Open the ecommerce-modern-store folder and make changes to the following files.
In the main ecommerce-modern-store folder you will find the page.php file. Edit the file and find this code, then delete it (line 18):
<p class="wpdevart-banner-page-entry-text"><?php echo esc_html__('By ', 'ecommerce-modern-store'); ?><span class="wpdevart-banner-page-entry-meta"><?php the_author_posts_link(); ?></span><?php echo esc_html(' / '); ?> <span class="wpdevart-banner-entry-date"><?php esc_html(the_time('F j, Y')); ?></span><?php echo esc_html(' / '); ?><span class="wpdevart-banner-page-entry-meta"><a href="<?php comments_link(); ?>"><?php esc_attr(comments_number()); ?></a></span></p>In the main ecommerce-modern-store folder you will find the single.php file. Edit the file and find this code, then delete it (line 15):
<p class="wpdevart-banner-entry-text"><?php echo esc_html__('By ', 'ecommerce-modern-store'); ?><span class="wpdevart-banner-entry-meta"><?php the_author_posts_link(); ?></span><?php echo esc_html(' / '); ?> <span class="wpdevart-banner-entry-date"><?php esc_html(the_time('F j, Y')); ?></span><?php echo esc_html(' / '); ?><span class="wpdevart-banner-entry-meta"><a href="<?php comments_link(); ?>"><?php esc_attr(comments_number()); ?></a></span><?php echo esc_html(' / '); ?> <span class="wpdevart-banner-entry-meta"><?php echo get_the_category_list(', '); ?></span></p>In the main ecommerce-modern-store folder you will find the front-page.php file. Edit the file and find this code, then delete it (line 42):
<p class="wpdevart-banner-page-entry-text"><?php echo esc_html__('By ', 'ecommerce-modern-store'); ?><span class="wpdevart-banner-page-entry-meta"><?php the_author_posts_link(); ?></span><?php echo esc_html(' /'); ?> <span class="wpdevart-banner-entry-date"><?php esc_html(the_time('F j, Y')); ?></span></p>Thank you.
That seems to have worked.
Thank you.
Can you also let me know how to remove the page titles from the top of each page?
Hi @johnstiles.
Before the p tags we mentioned there are h1 tags, you can remove them from all the pages we have already mentioned.
By the way, you can also remove the entire div if you don’t need it.
Thank you.
The topic ‘Remove author name and publish date’ is closed to new replies.
