最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

css - Hide BBPress create topic on one page

programmeradmin1浏览0评论

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.

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.

Share Improve this question edited Jul 29, 2019 at 11:52 tejt asked Jul 23, 2019 at 10:52 tejttejt 14 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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://wwwpetethemes/blog/find-page-id/

发布评论

评论列表(0)

  1. 暂无评论