How do I remove from displaying date, category, tag from the post?
the posts are appearing in the main window and I would like to display them as link and nothing else.
new to this, please provide details.
using theme Blocks 2.1.4 by mg12
How do I remove from displaying date, category, tag from the post?
the posts are appearing in the main window and I would like to display them as link and nothing else.
new to this, please provide details.
using theme Blocks 2.1.4 by mg12
only at your index page? simply remove the the tags, dates and category
this is the line for the tag: <?php the_tags('Tags: ',', ','<br />');
category: <?php the_category(', ') ?>
date: <?php the_time('j') ?>
<?php the_time('M') ?>
this is my PHP code. I think it is different
<?php $options = get_option('blocks_options'); ?><?php get_header(); ?><?php if ($options['notice']) : ?> <div class="block"> <div class=" <?php if($options['notice_color'] == 1) {echo 'content';} else if($options['notice_color'] == 3){echo 'content r';} else{echo 'content g';} ?>"> <div id="notice_content"><?php echo($options['notice_content']); ?></div> </div> </div><?php endif; ?><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <h3 class="title">" rel="bookmark"><?php the_title(); ?></h3> <div class="content"> <?php the_content(__('Read more...', 'blocks')); ?> <div class="fixed"></div> </div> <div class="meta"> <div class="alignleft floatleft"> <div class="date"><? printf( __('%1$s at %2$s', 'blocks'), get_the_time(__('l, F jS, Y', 'blocks')), get_the_time(__('H:i', 'blocks')) ); ?></div> <?php if ($options['categories']) : ?> <div class="post_info"><?php _e('Categories: ', 'blocks'); the_category(', ') ?></div> <?php endif; ?> <?php if ($options['tags']) : ?> <div class="post_info"><?php _e('Tags: ', 'blocks'); the_tags('', ', ', ''); ?></div> <?php endif; ?> </div> <div class="alignright floatright"> <div><?php comments_popup_link(__('No comments', 'blocks'), __('1 comment', 'blocks'), __('% comments', 'blocks')); ?></div> <div><?php edit_post_link(__('Edit', 'blocks'), '', ''); ?></div> </div> <div class="fixed"></div> </div> </div><?php endwhile; ?> <div id="pagenavi" class="block"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <div class="content g"> <span class="newer"><?php previous_posts_link(__('« Newer Entries', 'blocks')); ?></span> <span class="older"><?php next_posts_link(__('Older Entries »', 'blocks')); ?></span> <div class="fixed"></div> </div> <?php endif; ?> </div><?php else: ?> <div class="block"> <div class="content small r"> <?php _e('Sorry, no posts matched your criteria.', 'blocks'); ?> </div> </div><?php endif; ?><?php get_footer(); ?>
which lines do i remove>
thank you for your help
this one:
<div class="meta"> <div class="alignleft floatleft"> <div class="date"><? printf( __('%1$s at %2$s', 'blocks'), get_the_time(__('l, F jS, Y', 'blocks')), get_the_time(__('H:i', 'blocks')) ); ?></div> <?php if ($options['categories']) : ?> <div class="post_info"><?php _e('Categories: ', 'blocks'); the_category(', ') ?></div> <?php endif; ?> <?php if ($options['tags']) : ?> <div class="post_info"><?php _e('Tags: ', 'blocks'); the_tags('', ', ', ''); ?></div> <?php endif; ?> </div>
but back-up the file before editing.. i might overlooked some div tags
I have downloaded the index.php so i have a backup.
removed suggested. all links are working so far but
comments, date, all the info still there
here is my new index.php
<?php $options = get_option('blocks_options'); ?><?php get_header(); ?><?php if ($options['notice']) : ?> <div class="block"> <div class=" <?php if($options['notice_color'] == 1) {echo 'content';} else if($options['notice_color'] == 3){echo 'content r';} else{echo 'content g';} ?>"> <div id="notice_content"><?php echo($options['notice_content']); ?></div> </div> </div><?php endif; ?><?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <h3 class="title">" rel="bookmark"><?php the_title(); ?></h3> <div class="content"> <?php the_content(__('Read more...', 'blocks')); ?> <div class="fixed"></div> </div> </div> <div class="alignright floatright"> <div><?php comments_popup_link(__('No comments', 'blocks'), __('1 comment', 'blocks'), __('% comments', 'blocks')); ?></div> <div><?php edit_post_link(__('Edit', 'blocks'), '', ''); ?></div> </div> <div class="fixed"></div> </div> </div><?php endwhile; ?> <div id="pagenavi" class="block"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <div class="content g"> <span class="newer"><?php previous_posts_link(__('« Newer Entries', 'blocks')); ?></span> <span class="older"><?php next_posts_link(__('Older Entries »', 'blocks')); ?></span> <div class="fixed"></div> </div> <?php endif; ?> </div><?php else: ?> <div class="block"> <div class="content small r"> <?php _e('Sorry, no posts matched your criteria.', 'blocks'); ?> </div> </div><?php endif; ?><?php get_footer(); ?>
oh. whats your url?
if you dont want to see it in the single-post page. you must remove it too..
probably another
<div class="meta">
<div class="floatleft">
....
..
was define in your footer.php. i checked your source code its still there.
do you have a category.php template?
you should remove that portion I specified above.
I am not seeing this
div class="meta">
<div class="floatleft">
in index.php
category.php is in directory wp-admin... what do i need to do with it?
i know i had the same file in the old them that i have deleted already....
never mind... it is categories.php so it is a different file you asked about.
what is single.php controls?
it has simular code
<div class="meta"> <div class="alignleft floatleft"> <div class="date"><? printf( __('%1$s at %2$s', 'blocks'), get_the_time(__('l, F jS, Y', 'blocks')), get_the_time(__('H:i', 'blocks')) ); ?></div> <?php if ($options['categories']) : ?> <div class="post_info"><?php _e('Categories: ', 'blocks'); the_category(', ') ?></div> <?php endif; ?> <?php if ($options['tags']) : ?> <div class="post_info"><?php _e('Tags: ', 'blocks'); the_tags('', ', ', ''); ?></div> <?php endif; ?>
Nazcar, I have picked the different theme which has an option to disbale all that info. i think it is clean now. thank you
for your help
This topic has been closed to new replies.