January 22, 201412 yr I'm trying to figure out how to remove these bits from my blog posts: If you need to have a look at the code, here's the link to the blog. Any ideas?
January 23, 201412 yr The trouble with looking at the code is php wont show up with view source. However - I had a look at the source and you need to look for a div tag with the class of post-header so: <div class='post-header'> </div> Inside that were will probably be calls to the_category and comments_number like: <div class='post-header'> *** Look for these functions below *** <?php the_category(); ?> <?php comments_number(); ?> </div> Remove those functions. I assume its in the standard post type but i cant be certain. if you dont have specific post type files then look in your index.php file. good luck ps this stuff is easier to find with something like chrome dev tools - when you hover over the code, the corresponding point on the page is highlighted. Edited January 23, 201412 yr by Mr Ben
January 23, 201412 yr Author It was in single.php ... Thanks! Edited January 23, 201412 yr by salvagesites
January 23, 201412 yr Author Do you know how I also remove this from the general blog page? It has been removed form posts.. But not the main blog page!
January 23, 201412 yr The same code that Ben noted will probably appear somewhere in index.php <?php the_category(); ?> <?php comments_number(); ?> If it is in index.php, remove them.
January 23, 201412 yr A The same code that Ben noted will probably appear somewhere in index.php <?php the_category(); ?> <?php comments_number(); ?> If it is in index.php, remove them. Do you know how I also remove this from the general blog page? It has been removed form posts.. But not the main blog page! Ah yes, sorry I forgot about single.php - Wordpress will display all blog posts excerpts in the index.php file and the single.php will show the entire blog post. Its the same functions that you are looking for in index.php and single.php. Thanks for the best answer vote
January 23, 201412 yr Author A Ah yes, sorry I forgot about single.php - Wordpress will display all blog posts excerpts in the index.php file and the single.php will show the entire blog post. Its the same functions that you are looking for in index.php and single.php. Thanks for the best answer vote Hmm.... It doesn't seem to be in my index.php: <?php get_header(); ?> <?php nectar_page_header(get_option('page_for_posts')); ?> <div class="container-wrap"> <div class="container main-content"> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?> <?php if(!is_home()) { ?> <div class="row"> <div class="col span_12 section-title blog-title"> <h1><?php wp_title("",true); ?></h1> </div> </div> <?php } ?> <div class="row"> <?php $options = get_option('salient'); $blog_type = $options['blog_type']; if($blog_type == null) $blog_type = 'std-blog-sidebar'; $masonry_class = null; //enqueue masonry script if selected if($blog_type == 'masonry-blog-sidebar' || $blog_type == 'masonry-blog-fullwidth') { wp_enqueue_script('blogmasonry'); $masonry_class = 'masonry'; } if($blog_type == 'std-blog-sidebar' || $blog_type == 'masonry-blog-sidebar'){ echo '<div id="post-area" class="col span_9 '.$masonry_class.'">'; } else { echo '<div id="post-area" class="col span_12 col_last '.$masonry_class.'">'; } if(have_posts()) : while(have_posts()) : the_post(); ?> <?php $wp_version = floatval(get_bloginfo('version')); if ( $wp_version < "3.6" ) { //old post formats before they got built into the core get_template_part( 'includes/post-templates-pre-3-6/entry', get_post_format() ); } else { //WP 3.6+ post formats get_template_part( 'includes/post-templates/entry', get_post_format() ); } ?> <?php endwhile; endif; ?> <?php nectar_pagination(); ?> </div><!--/span_9--> <?php if($blog_type == 'std-blog-sidebar' || $blog_type == 'masonry-blog-sidebar') { ?> <div id="sidebar" class="col span_3 col_last"> <?php get_sidebar(); ?> </div><!--/span_3--> <?php } ?> </div><!--/row--> </div><!--/container--> </div><!--/container-wrap--> <?php get_footer(); ?> .. Any ideas?
January 23, 201412 yr This may not be a completely ideal solution but it should work. Does your theme (Salient) have a 'Custom CSS' option somewhere in the Theme Options? Basically a place where you can input Custom CSS which will automatically overwrite any CSS from the files. This will be simpler because Themeforest themes come with tons of different CSS files and otherwise it will be a search to find this class. If you have a Custom CSS option, insert this code: .meta-category { display: none; } .meta-comments-count { display: none; }
January 27, 201412 yr Author This may not be a completely ideal solution but it should work. Does your theme (Salient) have a 'Custom CSS' option somewhere in the Theme Options? Basically a place where you can input Custom CSS which will automatically overwrite any CSS from the files. This will be simpler because Themeforest themes come with tons of different CSS files and otherwise it will be a search to find this class. If you have a Custom CSS option, insert this code: .meta-category { display: none; } .meta-comments-count { display: none; } It does.. I inserted the code, but nothing has happened..
Create an account or sign in to comment