Adding menu items.


Author Message
Shannon

Posted: 10/1/2008
Quote message 

I want to add in buttons on the menu to links external from Wordpress, such as an external gallery. I have been playing around with the code in header.php and cannot figure out what code I would add. Any help would be appreciated.
 
Marc Smith

Posted: 10/8/2008
Quote message 

Adding items to the header.php can be tricky and it all depends on the layout of your Wordpress theme.

One programming trick is to add text such as " I AM HERE " in spots of the header.php, just to locate where each section is.

Once you find the area where you want to add the buttons, then you would add them using an
<img src=">
tag just like html.

You may need to fool with the CSS to get it to appear right, as there may be img classes or divs defined in the CSS

- Hope this helps

- MJ
 
Christian DE NEEF

Posted: 10/8/2008
Quote message 

I tried Artisteer for the first time today (rather impressed) and I ran into a similar/related problem. The WordPress theme, once imported, revealed 2 buttons: Home & About. The latter refers to page 2 (http://localhost/wordpress/?page_id=2) but the former unfortunately does not refer to anything. I have opened the php code in search of the missing reference but couldn't find it. A guide on solving this kind of issues/tweaking the generated code would be a nice addition. As long as I cannot access that Home page, the generated WordPress theme is useless…

Thank you in anticipation,


Christian.
 
Marc Smith

Posted: 10/8/2008
Quote message 

Artisteer builds the template based on the default install. If you ahve an about page, it will appear on the menu. Remove the about page and the about button will disappear.

The home button is definitely a bit unneeded as I create a Home page myself, so I now have two HOME page buttons. I am looking at how this is being set so I can remove it.
 
Marc Smith

Posted: 10/8/2008
Quote message 

If you want to remove the "home' page button, you need to look at the functions.php file and find the line of code that says:

echo '<li><a' . (is_page() ? '' : ' class="active"') . ' href="' . $home . '"><span><span>Home</span></span></a></li>';


If you remove that line, it will remove the default link back to the top of the wordpress site.

As always, back up your files and EDIT CAREFULLY
 
Margaret

Posted: 10/21/2008
Quote message 

How do we remove other buttons to other pages we don't want links to across the top of our pages?

I only want some of my pages to have buttons.

Thanks.
 
Marc Smith

Posted: 10/23/2008
Quote message 

Wordpress puts all the pages into a 'menu' selection like Artisteer creates.

In order to only show the pages you want, you'll need to find a plugin that allows you to manipulate the list of pages and what you want to show. There are plenty of navigation plugins out there, I am sure one will work.
 
Kevin

Posted: 10/23/2008
Quote message 

I suspect there is more page filtering code, hiding within Artisteer.

For example, this php function...

function art_header_page_list_filter($pages)

I will work this out. I need to control the pages appearing in the navigation menus, just like everyone else.

And I try not to use extra plugins, because they often suffer from wordpress version fatigue.

Kevin



 
Beth

Posted: 11/6/2008
Quote message 

If you want to exclude a page from the top nav, look for this block of code in functions.php:

function art_menu_items($hierarchy)

and then a few lines down, add the &exclude=PAGEID code:

wp_list_pages('title_li=&exclude=3');

 
Marc Smith

Posted: 11/7/2008
Quote message 

Beth,

That would work if you wanted to exclude just one page from all of the template, but how would you exclude one page when you are on a particular page? Or have a range of pages?

You need to set an array and use the conditional tags, such as is_home() or is_pageID()

You can read more about conditional tags here:

http://codex.wordpress.org/Conditional_Tags


 
Brett Bumeter

Posted: 1/25/2009
Quote message 

Quote Beth:

If you want to exclude a page from the top nav, look for this block of code in functions.php:

function art_menu_items($hierarchy)

and then a few lines down, add the &exclude=PAGEID code:

wp_list_pages('title_li=&exclude=3');


I've tried several of the methods suggested and just wanted to mention that this one worked well for me when I was trying to exclude policy pages from the upper level menus.
 
Andre Gericke

Posted: 2/2/2009
Quote message 

Quote Marc Smith:

If you want to remove the "home' page button, you need to look at the functions.php file and find the line of code that says:

echo '<li><a' . (is_page() ? '' : ' class="active"') . ' href="' . $home . '"><span><span>Home</span></span></a></li>';


If you remove that line, it will remove the default link back to the top of the wordpress site.

As always, back up your files and EDIT CAREFULLY


Thanks for te solution - you have managed to do what migrane meds were not. My headached has finally subsided - regards
 
Jen

Posted: 3/3/2009
Quote message 

Quote Beth:

If you want to exclude a page from the top nav, look for this block of code in functions.php:

function art_menu_items($hierarchy)

and then a few lines down, add the &exclude=PAGEID code:

wp_list_pages('title_li=&exclude=3');


Beth - thank you for this solution! There is definitely a need to be able to selectively exclude a page (or pages) from a limited-width horizontal nav, while still allowing a full list of pages to appear elsewhere.
Jen

 
Caroline

Posted: 3/4/2009
Quote message 

Hello everyone,

Just want to answer the original post from Shannon and suggest how to add a link to your menu. It is quite simple, just change the header.php file adding the code like:

<ul class="menu">
<?php art_menu_items(true); ?>
<li><a href="your_url_here"><span><span>Your_link</span></span></a></li>
</ul>

And BTW, regarding the Home button: in Artisteer 2 this button will be optional so you won't need to remove it manually from the code. Release Candidate version already has this option available under:
Export Options > WordPress > Home Page Menu Item

Have a nice day.

Caroline.
 
James

Posted: 7/28/2009
Quote message 

:-) :-)
Caroline - Thank you for the tip. What an elegant and straight-forward way to get the menus I was after!!!

Check it out: www.greatdayinteractive.com/blog/

Cheers!

James
 
Garry

Posted: 8/6/2009
Quote message 

You can add an external link to your navigation menu just by installing following plugin:

http://wordpress.org/extend/plugins/page-links-to/
 
Amanda

Posted: 8/14/2009
Quote message 

Quote Beth:

If you want to exclude a page from the top nav, look for this block of code in functions.php:

function art_menu_items($hierarchy)

and then a few lines down, add the &exclude=PAGEID code:

wp_list_pages('title_li=&exclude=3');



Can someone please help me. No matter what I do I can't get this to work. I get this message and then can't work on my page anymore:
Parse error: syntax error, unexpected T_STRING, expecting '{' in /home/MY PAGE/wp-content/themes/draft2/functions.php on line 527

Talk me through it like talking to someone with NO experience. I just want to remove pages from the menu. This shouldn't be so hard.
 
Garry

Posted: 8/14/2009
Quote message 

@ Amanda

Did your Wordpress started displaying this message after entering that code
 
MB

Posted: 8/20/2009
Quote message 

In the newest version of Artisteer (I downloaded today)

Here's how to change title of the Home button to whatever you like

Inside the WP Administration Panel, under

Appearance then
Editor

Open the functions.php template, where you'll see

<?php

$artThemeSettings = array(
'menu.showSubmenus' => false,
'menu.homeCaption' => "Home",

Change the code like this:

<?php

$artThemeSettings = array(
'menu.showSubmenus' => false,
'menu.homeCaption' => "Your New Button Title",

Hope this helps someone! (This was a frustrating problem, but the solution is so simple. Thanks for the upgrade guys!
 
Pablo Federico

Posted: 4/28/2010
Quote message 

:-D Artisteer lets you hide the menu.

 
Bob

Posted: 4/28/2010
Quote message 

Under export options you can select whether or not to show Home in the menu also.
 
she-elf

Posted: 6/18/2010
Quote message 

Quote MB:

In the newest version of Artisteer (I downloaded today)

Here's how to change title of the Home button to whatever you like

Inside the WP Administration Panel, under

Appearance then
Editor

Open the functions.php template, where you'll see

<?php

$artThemeSettings = array(
'menu.showSubmenus' => false,
'menu.homeCaption' => "Home",

Change the code like this:

<?php

$artThemeSettings = array(
'menu.showSubmenus' => false,
'menu.homeCaption' => "Your New Button Title",

Hope this helps someone! (This was a frustrating problem, but the solution is so simple. Thanks for the upgrade guys!



:-@ :-{}

Thank you, thank you, thank you! I've been doing this for SUCH A LONG TIME ineffectively I almost lost my hope that this can be done.
Seriously, can I get you a coffee?;)
Best regards!
 
Garry

Posted: 6/21/2010
Quote message 

You can also change the hyperlink of Home menu item as following:

http://www.artisteer.com/Default.aspx?post_id=128627&p=forum_post&forum_id=13
 
Gareth

Posted: 8/3/2010
Quote message 

Quote Beth:

If you want to exclude a page from the top nav, look for this block of code in functions.php:

function art_menu_items($hierarchy)

and then a few lines down, add the &exclude=PAGEID code:

wp_list_pages('title_li=&exclude=3');



You can exclude multiple pages by doing the following:
wp_list_pages('title_li=&exclude=1,2,3&sort_column=menu_order';

Hope that helps someone
:-) 8-)
 
Dave Shuts

Posted: 9/13/2010
Quote message 

To exclude pages from the menu:

1) go to the navigation.php file in the core files
2) find the code:

/* pages */
function art_get_list_pages($args = array()) {
global $wp_query;

At the bottom of this block of code find this line and add 'exclude=2' (or whatever the page number is:

$pages = &get_pages('exclude=2');

To exclude more pages seperate with a comma, eg 'exclude=2,3,33,999' etc.

Hope that helps someone, just did my head trying to find that.

Dave
 
Kate

Posted: 9/13/2010
Quote message 

Hi Everyone

I've just had a quick look through all of the posts so please forgive me if I'm on the wrong track, but has anyone tried using the custom menu option in Wordpress 3.0.1?

When I first uploaded my new theme, all of the categories appeared in the menu. All I had to do was create a custom menu and make it the primary one.

By creating a custom menu, I was able to decide which tabs appeared and the order they appeared. I was also easily able to create a drop down menu of several tiers in the order I wanted.

There is also the function to create custom links within the navigation menu.

I'm pretty good with code but if I can stay out of it, I will :)

Cheers

Kate