Community Forums › Forums › Archived Forums › General Discussion › remove .post-meta, .post-info
- This topic has 6 replies, 3 voices, and was last updated 11 years ago by Ben Siegfried.
-
AuthorPosts
-
March 30, 2013 at 9:34 am #32081Ben SiegfriedMember
I am wanting to remove .post-meta and .post-info, just the text, not the border-top or margin or padding.
I zeroed out the font-size for both and that removed them, but is there a better way?
Using 'display:none;' for each isn't what I want, I want just the text to be removed for each.
March 30, 2013 at 10:27 am #32088SusanModeratorTry one of these code snippets:
March 30, 2013 at 10:43 am #32094Ben SiegfriedMemberThanks Susan, but I don't see how I can do what I really want to do. I see there is CSS in the code snippets page you shared. I was able to get the effect of removing the post-meta and post-info by taking the font-size in CSS down to '0px', but is there a better way at removing these like with short code… and keeping the margins and padding, and border styling? I want to remove the text without using CSS.
By using the remove action on .post-meta it removed all of the CSS declarations. The only declaration I want to be affected is the font-size; I want the text removed, and want to know if there is a way to remove it with short code or remove action, WITHOUT removing all the other CSS declaration stylings.
March 30, 2013 at 10:58 am #32099Ben SiegfriedMemberOf these two snippets from the functions.php file, what and how would I change them to remove the .post-meta & .post-info text, and would this also remove the padding and margins, and borders declarations in CSS for each?
/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = '[post_date] by [post_author_posts_link] · [post_comments] [post_edit]';
return $post_info;
}}/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if (!is_page()) {
$post_meta = '[post_categories before="Filed Under: "] · [post_tags before="Tagged: "]';
return $post_meta;
}}March 30, 2013 at 12:21 pm #32109Brad DaltonParticipantInstall the Genesis Simple Edits plugin and remove the shortcode's.
March 30, 2013 at 12:27 pm #32111Ben SiegfriedMemberThanks, that works.
March 30, 2013 at 12:37 pm #32114Ben SiegfriedMemberI found that adding these to your functions.php file also work but then you have to add in CSS margin, padding, border styling to bring back those settings. See code below for this method. Removing the shortcodes from Genesis Simple Edits plugin is much cleaner and quicker, it removes only what I wanted removed.
// Remove post meta
remove_action('genesis_after_post_content', 'genesis_post_meta');// Remove the post info function
remove_action('genesis_before_post_content', 'genesis_post_info');.post {
margin:0px;
padding:0px;
border:0px solid #000000;
}
-
AuthorPosts
- The topic ‘remove .post-meta, .post-info’ is closed to new replies.