• Hi guys,

    It’s my first post and I’m afraid I have no coding knowledge whatsoever.

    I just wanted to find out if it’s possible to remove the category names from appearing from above my posts, whilst still allowing the posts that belong to the category to appear.

    I.e. Homes for sale in New York

    When people look at a drop down menu they’ll be able to select homes for sale in New York. When the posts appear on screen they’ll not have the category title ‘Homes for sale in New York’ above each of them.

    Apologies if I’ve not been as clear as you’d have liked but if you could help me it would really improve my blog.

    Thanks guys,

    Snoop

Viewing 15 replies - 1 through 15 (of 17 total)
  • A link to your site and a mention of the theme you’re using would help us to see what’s happening.

    Cheers

    PAE

    Thread Starter snoopdob

    (@snoopdob)

    Hi Peredur,

    Here’s the site in question: http://www.capturedhomes.co.uk/category/location/swansea/

    I’m using the custom community from themekraft theme.

    Thanks!

    A Custom Menu can help…. if your theme supports it.

    Thread Starter snoopdob

    (@snoopdob)

    Hi mate,

    I just want to remove the category titles from immediately above the posts. However, I still want the categories to work – I’ve used these for navigation from the menu bar at the top of the screen.

    .category .pagetitle {
          display: none;
    }

    in your style.css should handle it

    Thread Starter snoopdob

    (@snoopdob)

    Hey Voodoo,

    I just gave that a try and it didn’t work. Any other ideas?

    Thanks

    OK, so I’m looking at the homes for sale in Swansea. What exactly is it you want to get rid of? The bit that says, “You are browsing the archive for Swansea”?

    If it is, unfortunately, the CSS is contained in a style block in the HTML page. Not the best strategy in my opinion.

    So your best bet might be to try using specificity. Something like the following in your (child) theme’s style sheet:

    h3.pagetitle {
      display: none;
    }

    Failing that I guess you’d have to find the template file that’s outputting the page title, and suppress it there by taking it out of the PHP/HTML.

    Please bear in mind that Child Themes are the only recommended way of modifying WordPress themes.

    HTH

    PAE

    Now that I review this better, I am fairly sure the class being called is named “date” and is within a <p>

    so add this to css at bottom:

    p.date {
    display: none;
    }

    but it seems to need some bottom padding or height added to the element(s) above as this cuts off the img below a bit

    IE9>Gear(upper right)>F12 Developer tools>Scroll so element is visible>Find>Select Element by Click>Modify found CSS (click and edit)>or click attributes tab and add inline style which is what you add to override style in child theme css.

    Thread Starter snoopdob

    (@snoopdob)

    Sorry guys what I want to get rid of is the ‘in 4 bedroom, Swansea, 500,000+’

    and in the post below ‘4 Bedroom, Swansea, £150,000 to £200,000’

    and so forth.

    Thanks a lot! Really appreciate the help.

    The p element with the class date is the paragraph that says something like: “in 4 Bedroom, Swansea, £500,000 +”. For some reason the person writing the HTML/CSS appears to think that ‘date’ describes this. It’s also in the style block in the HTML page.

    Is that what you want to hide?

    And yes it does have some margin and padding, that you could get rid of.

    Can I ask why all this is appearing in a style block? Is it beyond your control, because it makes things much more difficult.

    HTH

    PAE

    did you try:

    div.post p.date, div.post p.postmetadata, div.comment-meta {
    display: none;
       }

    keep or lose elements as you wish:)

    Thread Starter snoopdob

    (@snoopdob)

    Peredur and Swanson thanks for your efforts, I removed the offending articles by making that altercation to the ‘date’.

    Our of interest how would I get rid of the margin and padding?

    Cheers guys

    Thread Starter snoopdob

    (@snoopdob)

    Thanks to deepbevel too for his suggestion

    yes, well upon reviewing the entire thread I must admit I’m not sure what the goal is, I was kinda lazy and just went by your thread title. hope you solve;)

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Hide category name from appearing above posts’ is closed to new replies.