WordPress.org

Ready to get started?Download WordPress

Forums

Gracia Theme Navigation (22 posts)

  1. sleepy_daze
    Member
    Posted 1 year ago #

    I'm not sure if this thread is in the right section, but I really need up with the Gracia theme from [ link removed, that site is not welcome here ]. My client somehow ended up deleting all of the horizontal navigation in the purple and I can't figure out how to bring it back. It doesn't seem like there's a widget for the horizontal nav and I'm pretty sure she didn't mess with the coding.... PLEASE HELP!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you reinstall the theme?

  3. sleepy_daze
    Member
    Posted 1 year ago #

    I have just started working on this site and I'd rather not... I just want to get the horizontal navigation back on there. It seems like she hasn't lost any pages, but she was editing things in the "Pages" section, so I'm not sure if there's something she clicked in there or... And she also said she was in the "Links" section. There's no links in there, so I added one and there still was no change.

  4. sleepy_daze
    Member
    Posted 1 year ago #

    I also know that the WP Cache is disabled... but I don't think that makes a difference for the navigation, unless I'm wrong...

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    In future, to avoid losing your changes whence updating themes, make your modifications in a Child Theme.

  6. sleepy_daze
    Member
    Posted 1 year ago #

    But do you know how I can put the horizontal navigation back?

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Which bit of the navigation is missing, the CSS or HTML?

  8. sleepy_daze
    Member
    Posted 1 year ago #

    I think it's HTML. I'm just not sure where in WordPress the fix for this could be

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    Here's the HTML for the navigation
    http://pastebin.com/W9PkjVKW

  10. sleepy_daze
    Member
    Posted 1 year ago #

    Thanks! I'm not exactly sure where it's supposed to go though... in header.php or index.php...?

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    Nevermind, I've lost my brain.
    The navigation cannot be just pasted in, it needs to be generated automatically based on the pages of your theme.

  12. Andrew
    Forum Moderator
    Posted 1 year ago #

    Have you checked whether creating a Custom Menu adds menu items?

  13. sleepy_daze
    Member
    Posted 1 year ago #

    I checked "Custom Menu" and it appears to add a "Custom Menu" to the theme's sidebar... So I'm assuming that's not the horizontal navigation menu.

  14. sleepy_daze
    Member
    Posted 1 year ago #

    Yeah, I just tested it. When I add a "Custom Menu", it adds the navigation to the sidebar. And when I add a new link to the "Links" section, it also adds the link to the sidebar.

  15. Andrew
    Forum Moderator
    Posted 1 year ago #

    In your header.php file, is there a bit of code named, wp_nav_menu?

  16. sleepy_daze
    Member
    Posted 1 year ago #

    Nope, but there is a div called "pagemenucontainer"... maybe I'll need to add some code in there?

    Do you think that there is some sort of place outside of the code on the dashboard that might have been changed?

    Nonetheless, below is the code for my header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' |'; } ?> <?php bloginfo('name'); ?></title>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/screen.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/print.css" type="text/css" media="print" />
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <?php if(get_theme_option('featured_posts') != '' && is_home()) {
    ?>
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/mootools-1.2.1-core-yc.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/mootools-1.2-more.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.transitions.js" type="text/javascript"></script>
    <?php } ?>
    <!--[if IE 6]>
    	<script src="<?php bloginfo('template_url'); ?>/js/pngfix.js"></script>
    <![endif]-->
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <link rel="stylesheet" href="http://ahelpinghandnc.org/wp-content/plugins/simple-sidebar-navigation/customsuckerfish.css" type="text/css" media="screen, projection" />
    <script src="http://ahelpinghandnc.org/wp-content/plugins/simple-sidebar-navigation/suckerfish_ie.js" type="text/javascript"></script>
    </head>
    <body>
    
    	<div id="wrapper">
    		<div id="container" class="container">
    			<div class="span-24">
    				<div class="span-14">
    					<div id="pagemenucontainer">
    						<ul id="pagemenu">
    							<li><img src="<?php bloginfo('template_url'); ?>/images/tagline.png"  style="margin:0 4px 0 0;"  /></li>
    							</ul>
    					</div>
    				</div>
    
                    <div class="span-3 feedtwitter" style="margin-top: 5px; text-align:right;">
    					<a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/rss.png"  style="margin:0 4px 0 0;"  /></a>
    					<?php if(get_theme_option('twitter') != '') { ?><a href="<?php echo get_theme_option('twitter'); ?>" title="<?php echo get_theme_option('twittertext'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/twitter.png"  style="margin:0 4px 0 0; "  title="<?php echo get_theme_option('twittertext'); ?>" /></a><?php } ?>
    				</div>
    
    				<div id="topsearch" class="span-7 last">
    					<?php get_search_form(); ?>
    				</div>
    			</div>
    				<div id="header" class="span-24">
    					<div class="span-11">
    						<?php
    						$get_logo_image = get_theme_option('logo');
    						if($get_logo_image != '') {
    							?>
    							<a href="<?php bloginfo('url'); ?>"><img src="<?php echo $get_logo_image; ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" class="logoimg" /></a>
    							<?php
    						} else {
    							?>
    							<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    							<h2><?php bloginfo('description'); ?></h2>
    							<?php
    						}
    						?>
    
    					</div>
    
    					<div class="span-13 last" style="padding-top: 5px; text-align:center;">
    						<?php echo get_theme_option('ad_header'); ?>
    					</div>
    				</div>
    
    			<div class="span-24">
    			<div class="navcontainer">
    					<ul id="nav">
    						<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li><li <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Simple Top Nav') ) : ?>> <!--YOUR OLD NAVIGATION --><?php endif; ?></li>
    												</ul>
    												</div>
    												<div class="contain">
    	</div>
  17. sleepy_daze
    Member
    Posted 1 year ago #

    I'm pretty sure that I found where the menu is generated in the code for the "originalheader.php" file. I just don't know how to add the pages:

    <div id="pagemenucontainer">
    						<ul id="pagemenu">
    							<li <?php if(is_home()) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
    							<?php wp_list_pages('depth=1&sort_column=menu_order&title_li=' ); ?>
    						</ul>
    					</div>
  18. Andrew
    Forum Moderator
    Posted 1 year ago #

    Have your missing menu items been assigned parent pages?

  19. sleepy_daze
    Member
    Posted 1 year ago #

    No, should I do that and assigned an order number to them?

  20. Andrew
    Forum Moderator
    Posted 1 year ago #

    This bit,

    wp_list_pages('depth=1&sort_column=menu_order&title_li=' );

    Specifically this,

    depth=1

    Will only pick up the top level pages, so no, don't assign parent pages to pages you want shown in the navigation.

    Further reference on wp_nav_menu function found at http://codex.wordpress.org/Function_Reference/wp_nav_menu#Parameters

  21. sleepy_daze
    Member
    Posted 1 year ago #

    The problem with not assigning parent pages is that some of the pages do have parent pages. Before this navigation was (somehow) deleted, it had drop-down menus. So how would I apply the pages that don't have parent pages to "wp_list_pages" ?

  22. sleepy_daze
    Member
    Posted 1 year ago #

    Hey, could someone help me create a horizontal navigation drop-down menu for the Gracia theme? The following is in my header.php code:

    <div class="navcontainer">
    		<?php
                        if(function_exists('wp_nav_menu')) {
                            wp_nav_menu( 'depth=1&theme_location=menu_2&menu_id=nav&container=&fallback_cb=menu_2_default');
                        } else {
                            menu_2_default();
                        }
    
                        function menu_2_default()
                        {
                            ?>
                            <ul id="nav">
        						<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li><!--
        						<?php wp_list_pages('depth=2&hide_empty=0&orderby=name&order=ASC&title_li=' ); ?>-->
        					</ul>
                            <?php
                        }
                    ?>		
    
    				</div>

    The second part is commented out because it reveals ALL of the pages on the website. However, I don't want it to do that. There are parent and children (and even grandchildren) pages and I want to create drop-down menus that reflects that hierarchy. Please help!

    I've created a custom menu that shows the hierarchy, so is there a way to call that custom menu (which is called "Navigation")?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags