Forum Replies Created
-
AuthorPosts
-
mark_prMember
I went ahead and used solution #1. Although I needed to leave this code still in the function.php file:
locate_template( ‘/inc/boldgrid-theme-framework-config/config.php’, true, true );
require_once get_template_directory() . ‘/inc/boldgrid-theme-framework/boldgrid-theme-framework.php’;That worked for the blog page, but it didn’t remove the date on the individual post page (when you click the blog title on the blog page). On the individual post page, the date still shows.
Here is what my current functions.php file has:
<?php
/**
* Prints HTML with meta information for the current post-date/time and author.
*
* @see: https://www.boldgrid.com/support/question/in-the-blog-how-can-i-remove-the-posted-on-date-text/
*/
locate_template( ‘/inc/boldgrid-theme-framework-config/config.php’, true, true );
require_once get_template_directory() . ‘/inc/boldgrid-theme-framework/boldgrid-theme-framework.php’;
function boldgrid_posted_on() {
if ( is_archive() ) {
return;
}
$time_string = ‘<time class=”entry-date published updated” datetime=”%1$s”>%2$s</time>’;
if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
$time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time><time class=”updated” datetime=”%3$s”>%4$s</time>’;
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( ‘c’ ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
_x( ‘Posted on %s’, ‘post date’, ‘bgtfw’ ),
‘<a href=”‘ . esc_url( get_permalink() ) . ‘” rel=”bookmark”>’ . $time_string . ‘</a>’
);
$byline = sprintf(
_x( ‘by %s’, ‘post author’, ‘bgtfw’ ),
‘<span class=”author vcard”><a class=”url fn n” href=”‘ . esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘”>’ . esc_html( get_the_author() ) . ‘</a></span>’
);
echo ‘<span class=”posted-on”>’ . $posted_on . ‘</span><span class=”byline”> ‘ . $byline . ‘</span>’;
}What change to the functions.php file could I make to remove the post date from the individual post pages?
If you want to see what I mean:
http://advantageaccountingsolutions.com/our-blog/
Thanks again.
mark_prMemberThat did the trick.
Thanks again for all of your assistance!
mark_prMemberThanks Tim,
That works really well.
Mark Peltier-Robson
mark_prMemberThanks. Very Helpfull.
mark_prMemberSo, where would I add this code:
add_filter( 'widget_text', 'shortcode_unautop' ); add_filter( 'widget_text', 'do_shortcode' ); Is that the correct place for the Venetian child theme?
-
AuthorPosts