remove post date and comment section title
-
Hi All,
I’d like the [date of the post] and the [comments section heading] removed from pages and posts of my website.
Thanks in advance for your help.
The blog I need help with is: (visible only to logged in users)
-
Open the functions.php file and look for the following code. Just comment it out in case you want it later by using /* and */
if ( ! function_exists( ‘twentyten_posted_on’ ) ) :
/**
* Prints HTML with meta information for the current post—date/time and author.
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_on() {
printf( __( ‘<span class=”%1$s”>Posted on</span> %2$s <span class=”meta-sep”>by</span> %3$s’, ‘twentyten’ ),
‘meta-prep meta-prep-author’,
sprintf( ‘<span class=”entry-date”>%3$s</span>‘,
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
),
sprintf( ‘<span class=”author vcard”>%3$s</span>’,
get_author_posts_url( get_the_author_meta( ‘ID’ ) ),
sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyten’ ), get_the_author() ),
get_the_author()
)
);
}
endif; -
Open the functions.php file
@bprbielamcmillan – please ignore the above reply. WordPress.com users do not have access to our theme’s PHP files and is therefore irrelevant.
Since this is a CSS question, please wait for the CSS Staff to reply.
-
@richardolga2078, thanks for your help in the forums. We cannot edit the theme files here at WordPress.com. Just for your reference, take a look at this support page on the differences between WordPress.com and WordPress.org self-hosted installations.
-
/waving @tsp
This person @richardolga2078 never revisits any forum post they have “contributed to”, which is why there is a plethora of replies such as yours (mine and tt’s) that they never see.
-
Hi @bprbielamcmillan, to remove the date from posts, go to Appearance > Customize > CSS, delete all the informational text in that window, and paste in the following custom CSS.
.posted-on { display: none; }To hide the title at the top of the comments section on pages and posts, add the following.
.comments-title { display: none; } -
I am new on wordpress forum, so I don’t know lots of rules of this forum .However I will take care of these things.
-
-
-
@jj, no worries, and we were all new here at one time or another. :)
I hope you are doing well.
-
Thank you @thesacredpath.
Is CSS customisation only available for Premium Plans?
I suspect this as I’m not on premium and I cannot see the CSS customisation function.
Thanks in advance.
-
@bprbielamcmillan, since you have been here since before the switchover, in your dashboard at Store > Store you should be able to purchase the Custom Design upgrade at $30 and not have to buy the Premium Plan upgrade.
-
Thank you @thesacredpath.
I have purchased.
Where can I fulfil my original request to eliminate comment section from my pages and posts (so that comment heading and date and “no comments yet” don’t appear)?
Thanks in advance -
You can turn comments off for all future pages and posts globally at Settings > Discussion in your dashboard. For existing pages or posts, you can turn them off from within the post or page editor in the Discussion module by unchecking Allow comments and trackbacks. If the discussion module is not visible below the page/edit content area, go to Screen Options at upper right and activate it.
If you have a lot of posts or pages, you can use the Bulk Edit feature to turn the comments off on multiple pages and posts with just one edit. I linked to the support page for Bulk Edit on pages, but the process is the same for posts.
Go to Appearance > Customize > CSS, delete all the informational text in that window, and paste in the custom CSS that I gave to you above.
- The topic ‘remove post date and comment section title’ is closed to new replies.