How to add a LINK in the default horizontal menu without adding a new page?
How to add a LINK in the default horizontal menu without adding a new page?
It depends on the theme being used, but you can try creating a custom menu:
Ok, so how do i add extra markups?
eg
#section
so the menu jumps to a section of the page?
PS. Also how do I add css to the menu items and subitems
You can add any custom links you want using custom menus. Whatever element you want to jump to should have an id assigned. Then you can just append that id to the end of the page's URL after a "#".
For example, if you have a header on a page like this:
<h2 id="section2">Section 2</h2>
Then you can create a link that points to a URL like this to jump directly to it:
http://example.com/the-page/this-is-on/#section2
If you look at the source code of your page, you can see what id's and classes are assigned to your menu. You can use those to add any CSS you want to your theme's style.css file. When editing a theme, using a child theme is always a good idea.
cool, so how do I add different colors and fonts to different menu items??
:P
You would use these two CSS properties:
http://www.w3schools.com/cssref/pr_font_font-family.asp
http://www.w3schools.com/cssref/pr_text_color.asp
Without a link to your site I can't really suggest anything more specific.
i need the "Sign Up" and "add article" to be in red?
This in your theme's style.css should do it:
#secondary-menu li.menu-item-163 a,
#secondary-menu li.menu-item-160 a {
color: red;
}
You can change "red" to any hexadecimal RBG value (for example, red would be #ff0000) or one of these color names:
No need for anything complicated here, I use this plug-in, works well with 3.2.1 (I've been using it since 3.0.0 at least):
Nico M
London
http://blog.theflowerraj.org/
thanks very much for that plugin, can it modify the css in the admin or do i hack the default css?
@NicoMorrison:
Erm...I'm sure that plugin was extremely useful before custom menus were added to WordPress in version 3.0. However, I would think using the built-in menu screen (as long as your theme supports it) would be easier than installing a plug-in to do exactly the same thing. Plus, you'll end up with actual links (to anything you want) as opposed to dummy pages that redirect.
Also, I think this topic has moved past the actual custom link creation.
@expat:
No, that plugin is not for altering theme files. To alter your theme's CSS (usually style.css) you can try the built-in editor (Appearance->Editor) or use an FTP client to download and, after editing, reupload the file. These pages might help with that:
Also, when editing a theme, it's always a good idea to switch to a child theme so you don't lose your edits if/when your theme updates.
Edit:
If you really don't want to mess with any theme files, you can also try a plugin that allows you to add custom CSS dynamically. Here's a good one:
thanks, i try the editor to see if i can edit the css from the browser
You must log in to post.