Welcome to WebmasterWorld Guest from 18.205.176.100

Forum Moderators: not2easy

Message Too Old, No Replies

Editing forums with CSS

How do I re-write "Create new topic" in some of my forums?

     
7:50 am on Aug 19, 2017 (gmt 0)

New User

joined:Aug 19, 2017
posts:4
votes: 0


Hi. I have 2 issues. I have a wordpress site with 2 main forums each of which has several sub-forums.
1) When entering a sub-forum "Create new topic" appears automatically. I would like to have a "create new topic" button that you would need to click on instead of the "create new topic" message that appears automatically. "bbp Style Pack" is supposed to do this but it doesn't work. It creates a button named "create new topic" but doesn't remove the automatic message. That means I end up with both - the message and the button. It seems to be a bug. I thought maybe I can use CSS to remove the message so I only have the button. Is that possible? I've already been to the plugin's support forum and they are no help.

2) Assuming #1 above can be done, I would then like to rename the button in all sub-forums of 1 of the main forums. So the sub-forums in main forum 1 would have a "create new topic" button and the sub-forums in main forum 2 would have something else. I was told this could be done with CSS. I assume I would need to name each forum and then give the text I want for the button. Since all the forums to be changed are sub-forums of the same main forum is it possible to write a command that targets the main forum and then affects all of its sub-forums. That would make it much faster than targeting sub-forums one by one.

If #1 above can't be done so I would be stuck with the automatic message, then I would like to change that message in all sub-forums of 1 of the main forums. So the sub-forums of main forum 1 would display "create new topic" automatically and the sub-forums of main forum 2 would display something else. I'm not knowledgeable about CSS so don't assume anything. :) Thanks for any help.
8:15 am on Aug 19, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Hi locutus and welcome to WebmasterWorld [webmasterworld.com]
9:25 am on Aug 19, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2006
posts:2709
votes: 116


The first one can be done with CSS but you'll have to look at the source code (view source code with your browser). Find the link you want to hide and see if it's has an 'id' or 'class' on it. Then youll have to add something like this to your CSS file

#id-name {display:none}
or
.class-name {display:none}

It might be more complicated than that, though, because there may be other links that share the same class name.

The second one sounds like you want to change the words on an actual image. You can't do that with CSS -- you'll need a new image
2:48 pm on Aug 19, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4394
votes: 314


The forum-specific elements are not typically styled by your WordPress theme css, it is within the css of the plugin that manages the forums. You will need to examine the source code as suggested by londrum, but if the edits can be done within css it will be the plugin's css. If the plugin creators are not able to assist you, it is time to learn more about its css.

Viewing the source code will help you find the source of the "Create new topic" message. Once you determine the source of the message that you would like to replace with a button, then it may be an element of css or it may be in the plugin's templates or functions. If it is an element of css class, you can edit the css file.

If it is within the templates you could customize a template for each forum, but then it becomes a question of editing the plugin's functions to generate the proper template for each situation - not a simple DIY task and not something we can help with in the css forum. If the template is used for all forums, you can't change it only for one without changing the functions file that calls the default template.

Keep in mind that when designing your plugin, its creators set out the things that you are able to change, normally in a settings file. If the elements that you want to change are not covered in the settings file and not in the plugin's css file, you may not be able to change those elements without altering the plugin itself. That can have unexpected consequences.