WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] hide content (without changeing anything else) on page ? (8 posts)

  1. Yorumumuz-wp
    Member
    Posted 3 years ago #

    i really need some help,
    i want to hide the content are ONLY on my first page, and just the content are. everything else should be as it is. i am using the graphene theme.

    so this is my site;
    http://www.yorumumuzyorumunuz.com
    and what i want to hide is the white area that says "anasayfa" on the front page.

    help needed!
    thanks.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    try and add something like

    body.home .post {display: none; }

    to style.csss of your theme

  3. Yorumumuz-wp
    Member
    Posted 3 years ago #

    hmm, i did, and it seems to work, though the problem is that i have ordered my pages from 1-3 therefore i dont have a 'home' page. my first page is well page 1.
    is there something else i could try?

    thanks!

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    where is the problem if it works?

    can you define what you mean with 'first page' ?

    your question did not include any page 2 or 3 - maybe you need to reword the question?

    you can work with the page id as well:

    body.page-id-249 .post { display: none; }

  5. Yorumumuz-wp
    Member
    Posted 3 years ago #

    sorry if my Q wasn't written properly. Though I have managed to solve the problem with your last advice, by using page id instead.

    Thank you very much!! Just made my day =)

  6. Kahil
    Member
    Posted 3 years ago #

    How is this working? I tried this in several different ways and it isn't working.

    If I put in a specific class and tell it to display: none;, it works....I've done that many times, no biggie... but the part about a specific page ID doesn't work.

    Basically I have images in a sidebar that are put there via a simple text widget. I have two pages that are basically the same. The only difference is that I want specific images to display on one of the pages and a different set on the other. I'm trying to avoid creating separate widgets and templates, etc. It would be a huge time saver to simply have a class or id that I could wrap the image code in and have one set show on one page and not the other, etc.

    thoughts?

  7. Kahil
    Member
    Posted 3 years ago #

    do you have to have wordpress set to use page id's in the URL structure? right now I am using the page names, which is required to use WP-Super Cache.

  8. Kahil
    Member
    Posted 3 years ago #

    figured it out... the theme I am using, despite being a newer one, wasn't using the body class feature.

    simply add <?php body_class($class); ?> into your body tag in your header and the page specific css will work. :)

Topic Closed

This topic has been closed to new replies.

About this Topic