• Resolved thePixelPixie

    (@yourbusybee)


    Hi there,
    I’ve installed BuddyPress on my site, and it’s working decently well with my site template right now. But there are some div elements that I would like to exclude only from certain pages (these are indiviual WordPress pages created specifically for BuddyPress functions – like “Members”, “Activate”, “Activity”, etc.)

    I have tried body.page-id-1696 #postdate {display: none;} for instance, with no luck.

    What am I doing wrong?

    Thanks in advance.

    ~Laura

Viewing 4 replies - 1 through 4 (of 4 total)
  • WPyogi

    (@wpyogi)

    What am I doing wrong?

    Without seeing your site, no way to know.

    Thread Starter thePixelPixie

    (@yourbusybee)

    Happy to provide the link. I just didn’t know if there might be something obvious with the format of the css or something:

    Specifically on this page (which seems to be the only one accessible without having an account – and membership for this site is very restricted): https://www.fiercebackbone.com/join I’m trying to remove the box where the post date appears (next to the “Create Account” header). The page id for this particular page is 1951 (the page id in my original message is for the members page).

    Thanks in advance.

    ~Laura

    WPyogi

    (@wpyogi)

    Looks like postdate is a class, not an id, so your CSS syntax is wrong. Also, that page id is not output in the body tag – it looks like this:

    <body class="registration register buddypress layout_none_sidebar js">

    So you need to use one of those classes in the CSS – whichever one is unique to that page:

    For example:

    body.register .postdate {
          display: none;
    }

    Thread Starter thePixelPixie

    (@yourbusybee)

    Ahhhh…thank you SO much! That definitely fixed it! I just used the buddypress part of that body tag and it took it out for all those pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove div element from only pages associated with BuddyPress?’ is closed to new replies.