Removing items from the menu

  • Hello again.

    I was wondering if it’s possible to remove some items from the Kubrik -theme’s menu, like this:

    I know I’m pushing my luck since I got earlier today such great help from the community, but this would be really the finishing touch for my blog.

    Best regards,

    -Topi

    The blog I need help with is: (visible only to logged in users)

  • You can achieve it by changing your sidebar widgets. Go to Widgets under Appearance tab and Drag and Drop items which you want to show to the Sidebar Box and remove the options from the same box which you don’t want.

    Thank you
    webesters

  • I have my current sidebar empty, so I can’t take anything away that way.

  • Thanks, now I got it!

  • I’d like to ask one more question related to removing things.

    Is it possible to remove “leave a comment” link from the bottom of every post?

  • That entire line is under .postmetadata. If you don’t mind losing the categories as well, you can do this:

    .postmetadata {
    display: none;
    }
  • Thanks, I will use that, if there’s absolutely no way to keep categories in tact.

  • You can keep the categories and remove just the comment link with:

    .postmetadata a[href$="respond"] {display:none;}

    This is CSS3 so it won’t work in IE versions before 7 but everything else should be fine. The only issue is that the seperating vertical bar still remains, probably not that much of an problem for you though.

    lh

  • Thanks again hallluke.

    That separating line was something I added manually to keep it more readable, but now with your code, I don’t need it anymore.

    Take care,

    -Topi

  • Whoa, that is slick!

    Saved to my ‘neat CSS tricks’ file.

  • Heh, I by the way totally misunderstood that “seperating verical bar” thing… I though you meant that vertical one, which I had purposely added by myself. English is not my first language.

    -Topi

  • ^Horizontal one, I meant.

  • It is possible to remove the vertical bar seperator. The method below isn’t ideal as it uses CSS to add non-stylistic content to the page which isn’t really the intended purpose.

    .postmetadata {visibility:hidden; position:relative; left:2.5em;}
    .postmetadata a {visibility:visible; position:relative; left:-4.5em;}
    .postmetadata:before {content:"Posted in:"; visibility:visible;}

    lh

  • I would strongly recommend not to use “em” units for margins or paddings. If you want “flexible” units, it’s better to use “%”. “em” units are relative to the font size of the parent element; also, they are affected by the font size specified in the user’s browser. “%” units are relative to size of the parent element and are not affected by the font size specified in the user’s browser.

    Take a look at these samples (in all of them, the blue line shows the alignment on those elements whose margin was defined in “%” units, the green line is for those whose margin was defined in “em” units):

    IE7 and font sizes set in browser were medium, larger, and largest

    Firefox 3. (in browser) Font sizes were set to 16, 20, 26

    Opera 9.27. (in browser) Font sizes were set to 16, 21, 26

    Safari 6. (in browser) Font sizes were set to 16, 21, 26

    In all the examples, I’m using two fonts: Arial and Times New

    The test page can be found here

    http://sandbox.coderlab.net/tests/text/fontest.html

    Just imagine, defining margins/padding in “em” units can produce undesired results in a layout if a user has set, in their browser, a font size different to the default one (which usually is 16).

    Even though “zooming” would preserve the layout if margins/paddings are define in “em” units, it’s always of good practice to keep in mind those users who would set a font size bigger than 16 just so they don’t have to “zoom in” every time they read a blog/site whose font is too small for them.

  • Thanks hallluke again! It boggles my mind how much code it takes to basically remove one character from the lay-out.

    Take care,

    -Topi

  • Is there, by the way, a way to modify the footer, for instance to remove the “Comments (RSS)” -part, since I’m not allowing any commenting?

  • There may be an easier way but I’m not firing on all cylinders today. And thanks for the tip devblog!

    #footer p {visibility:hidden;}
    #footer a {visibility:visible;}
    #footer a[href$="comments/feed/"] {display:none;}
    #footer a[href$="feed/"] {margin-left:3%;}

    lh

  • That code removed for some reason only the word “and” from the footer, at least in the preview -mode. Is the footer removable entirely?

    -Topi

  • By the way, I noticed that the current “posted in…” -link doesn’t work as I thought it would. For instance, when I click “posted in medium”, it redirects to http://en.wordpress.com/tag/medium/, while I thought it would link to http://pixelcounterrr.net/category/medium/

    Is there something I could do about it?

    -Topi

  • The topic ‘Removing items from the menu’ is closed to new replies.