Question

Hi sorry this is really basic question. I was just starting to explore wordpress and bbpress, I have a page with the forum index using the shortcode, when I enter a forum it has all the topics and the create topic form. I would like to hide this on this page only. The css to do for the whole document is as follows: fieldset.bbp-form { display: none; }. This is good but I would like the form to display on other pages. I have already .page-id-143 * fieldset.bbp-form { display: none; }. I appreciate this won't work because it is in some equivalent of an iframe. If there is an answer then I have never really used PHP before so could it be in very simple person terms. Thanks in advance.

Était-ce utile?

La solution

This took as surprisingly long time but I managed to figure it out:

fieldset.bbp-form {
    display: none;
}

.page-id-170 * fieldset.bbp-form {
  display: block !important;
}

I know this hides all and only shows on page id 170, and this is the opposite of what I asked but it suits my needs.

An answer more accurate to the question would be:

fieldset.bbp-form {
    display: block;
}

.page-id-170 * fieldset.bbp-form {
  display: none !important;
}

For both examples you would replace .page-id-170 with .page-id-(your page id). A quick guide to finding the page id: https://www.competethemes.com/blog/find-page-id/

Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top