• Resolved gemmaspeht

    (@gemmaspeht)


    Hi,

    I am using your brilliant theme Cleanr and I love it, it is great thanks. But I am having a problem in locating the postmetadata – the comments / category and edit links for each post. I only code CSS and HTML not php so cannot find it anywhere. I have done extensive searches for hours but to no avail.

    You can see in this link what it is I am trying to find and delete:

    It’s two dashes I am trying to delete from the code.

    Thanks Gemma

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter gemmaspeht

    (@gemmaspeht)

    Oops sorry the link:

    Screenshot

    Hey Gemmaspeht,
    Let’s fix your problem! And show you a little bit of back-end WP programming.

    0. I always recommend backing up your site first before messing with Theme files (the PHP and stuff).
    1. Go to your WP Dashboard
    2. Click on Appearance
    3. Click on Editor
    4. On the right hand side under Templates click on Main Index Template
    5. Find this line of code:

    <span class="postmetadata"><?php the_category(' / ') ?> &mdash; <?php comments_popup_link('Leave a comment', '1 comment', '% comments'); ?> <?php edit_post_link( ' &mdash; Edit' );

    6. Copy and paste it somewhere (notepad) so you have the original code backed up and so you can put it back if you mess up. You could also just copy and paste everything in that file so it’s backed up.
    6. Your culprit is the “& mdash ;” (without the spaces) Get rid of it or replace with something different. “& nbsp ;” (without the spaces) would be just a generic space.
    7. Click Update File

    Also, if you don’t like your Meta Data above the post title (I don’t like it personally, but it’s up to you!) you can move it!

    Put that whole line (the new one without the dashes) after this bit of code:

    <div class="entry"><br />
         <?php  // if ( has_post_thumbnail() ) { the_post_thumbnail( 'featured' ); } ?><br />
         <?php the_content('<em>Continue reading →</em>'); ?><br />
      </div>

    BUT ABOVE THIS LINE OF CODE:

    <div class="clearfix"></div><br />

    Finally, this will only take effect on your Home/Index page! You will most likely need to repeat these same changes (should be able to copy and paste for the most part) on some additional files located under Templates, such as: Archives.php, Page.php, and Single.php
    The culprit will be the same: “& mdash ;”

    Thread Starter gemmaspeht

    (@gemmaspeht)

    OMG I am so embarrassed I was looking in the wrong index.php file – the blank one in the upper level directory!! Apologies. What a plonker. I have found the code and taken out the — code..

    Thank you so much for your quick response!

    Thread Starter gemmaspeht

    (@gemmaspeht)

    Resolved thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting rid of punctuation in the postmetadata comments and edit links on posts’ is closed to new replies.