Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] How to remove the All Categories Text

PixiepopPixiepop New
edited September 2013 in Vanilla 2.0 - 2.8

Hello,

I have board set to show categories/all as the home page as I want it to look like a old fashioned forums.
At the top of the content area before the first category text I have the Text ** "All Categories"**
When I inspect with firebug it shows me the following line :

<div class="ItemHeading">All Categories</div>

When i delete that, yes it works great and removes the text.

My problem is I don't know how to see what file it is that controls this so I can remove this bit in the code.

Can anyone help me please.

Thank you.

Comments

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited September 2013

    @pixiepop

    The recommended way is to create a custom theme ( see here: http://vanillawiki.homebrewforums.net/index.php/A_Quick-Start_Guide_to_Creating_Themes )

    Even if you just want to make one change, it is better to do it in a custom theme's custom.css file.

  • I have a custom.css file as I have downloaded the theme Sugar from here, does that mean the text to remove would be in that file? As i deleted

    #Content .CategoryHeadings .ItemHeading { font-weight: bold; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; -o-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; background-color: #fff; padding: 2px 10px 0; text-transform: uppercase; margin-top: 8px; font-size: 62.5%; /* 11px / 16px */

    in the css file and all it did was change the font and layput of the words not actually remove them.

    I checked the code again using fire bug and see i remove all this in preview:

    <div class="Tabs Headings CategoryHeadings"> <div class="ItemHeading">All Categories</div>

    I am not used to css or programming, so I am unsure how to get rid of this text so any help locating the file that controls the wording not the layout of the wording would be great.

    I have checked the link you sent me, thank you but if honest it doesn't really make much sense to me sorry.

  • one way of removing element via css

    is to put

    display:none;

    however in this case it will probably remove all itemheadings.

    try running the code below in your console.

    you may need to use jquery to test for element.

        jQuery(document).ready(function($) {
            $('.ItemHeading:contains("All Categories")').replaceWith('');
         });
    

    I haven't tested - try it out in your console and see if it works. If it does you could add it vial plugin or themehooks.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I am sorry I don't have any idea what you mean to do :( You lost me at console... I about manage WordPress and installing vanilla via the instructions, if this cant be removed with a simple find this file in the location and remove this code I'm a bit screwed. Thank you for trying to help me though.

  • running js and jquery commands in web console

    in firebug. there is an option console.

    if you can't find it. go through a 10 minute tutorial.

    in chrome web developer tools there is an option for console.

    in the console - you cut and paste the code in the console and "run" it by clicking run.

    if the command changes your web page and removes the All categories and works as you like. You know the command works. if it does then proceed to this step:

    step 2 - You read the documentation on read a themehooks file. It's all there just requires searching the forum on themehooks and reading wiki. no use me regurgitating what is already there.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • Hello Thank you for that, I found the console but no sorry that isn't changing anything :(

  • do you have a link to your page

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Have sent you a PM thank you.

    vrijvlinder
  • or post a snapshot of web page with what exactly you are trying to change circled in red.

    and in the snapshot show the element with firebug details.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • peregrineperegrine MVP
    edited September 2013

    you may want to try this. Otherwise you will need to post a snapshot with item circled as it is impossible to guess further.

       jQuery(document).ready(function($) {
        $('.CategoryHeadings:contains("All Categories")').replaceWith('');
        });
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • actually the better way is

    make a conf/locale.php file with this in it.

    <?php if (!defined('APPLICATION')) exit();
    $Definition['All Categories'] ="";
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • I sent you a message with my url in. But My friend has managed to get your code above in to work. We just are not sure about your step 2...

    step 2 - You read the documentation on read a themehooks file. It's all there just requires searching the forum on themehooks and reading wiki. no use me regurgitating what is already there.

    Can you explain further on this point now we know your code removes the said text? Thank you

  • We have done it, many thanks for the code !

    vrijvlinder
  • peregrineperegrine MVP
    edited September 2013

    We have done it, many thanks for the code !

    the locale definitions I assume is what you decided upon as it is the best way.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • We added line 2 to our locale.php and its sorted it.

    vrijvlinderperegrineUnderDog
Sign In or Register to comment.