• bizeesheri

    (@bizeesheri)


    My blog currently uses the my theme with grass and dew template.
    https://www.iv-7sales.com/blog

    After a post, there is a comment icon or link. I am not allowing comments so I’d like to remove that.
    I also want to add tags. In the widgets, it allows me to add them to my left menu, but it looks terrible there. Didn’t appear to have enough room allocated and I don’t want it there anyhow. I’d like it just underneath I guess but not part of it.

    New to php, mysql, etc. I can manage my way. I found the table and field where the tags are kept in the database.

    Here is the some code I tried to comment out the comment’s line, didn’t work and tried to add a tags line, didnt work.

    $content_details[]=array(
    		'title'=>$page_title,
    		'content' =>get_the_content('Click here to read more.. ?'),
    		'thumbnail' =>the_post_thumbnail('thumbnail'),
    		'the_permalink' =>get_permalink(),
    		'comments'=>get_comments_number(),
    		'time'=>get_the_time('jS F Y'),          'category'=>get_the_category_list('','')
    		);

    [Please post code snippets between backticks or use the code button.]

    The tag is found in the wp_terms table, in the Name field.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Chris Everson

    (@chriseverson)

    Try searching your theme template files for the div below:
    <div class="comment"> ... </div>

    If you remove that div and its contents, it should remove the comment button from appearing on posts.

    As far as the tags goes, I don’t actually see anywhere on your site displaying the tags currently. Could you post a link to somewhere that displays them?

    Thread Starter bizeesheri

    (@bizeesheri)

    Ok great, got rid of the comments. thanks

    There are no tags currently as the only way I could tell you add them in the dashboard was through widgets and only then I could add to the left menu.

    I wanted them added elsewhere. When I removed the comments, my first column now only shows one item, the rest moved to the right, so under that first item would be great.

    Chris Everson

    (@chriseverson)

    I think the_tags does what you’re looking for.

    Thread Starter bizeesheri

    (@bizeesheri)

    Ok, I may have that figured out, but not fully.

    I put the comments stuff back in so I can figure out where I am in the page looking at code. That’s the location I’d like the tags.

    So I pasted <p><?php the_tags(); ?></p> Just ABOVE the div class comment. nothing shows. I think it needs more than what I pasted.

    I assume that is in the loop area, but I see another area where the comment count, date etc are located in the code. Not sure exactly where I’d add this.

    Chris Everson

    (@chriseverson)

    the_tags should be used in the loop. I’d double-check to make sure there are tags associated with the posts (sounds stupid but i’ve forgotten things like that countless times). It should be working otherwise.

    Thread Starter bizeesheri

    (@bizeesheri)

    I have tags, saw them in the database this morning.

    so where in here would it go (I remove the comment number when I remove comments)

    ‘content’ =>get_the_content(‘Click here to read more.. »’),
    ‘thumbnail’ =>the_post_thumbnail(‘thumbnail’),
    ‘the_permalink’ =>get_permalink(),
    ‘comments’=>get_comments_number(),
    ‘time’=>get_the_time(‘jS F Y’),
    ‘category’=>get_the_category_list($post->ID)
    );

    ?>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php //echo $content_details[0][‘category’];?>

    Thread Starter bizeesheri

    (@bizeesheri)

    I got it, just kept pasting the code in different areas and it now sits below my menu where I wanted it!

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add tags and then remove comment link’ is closed to new replies.