• Hi,

    I’ve installer a theme, here is my header `<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”https://www.w3.org/1999/xhtml&#8221; <?php language_attributes(); ?>>

    <head profile=”https://gmpg.org/xfn/11″&gt;

    <title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <meta http-equiv=”content-type” content=”<?php bloginfo(‘html_type’) ?>; charset=<?php bloginfo(‘charset’) ?>” />
    <meta name=”description” content=”<?php bloginfo(‘description’) ?>” />
    <?php if(is_search()) { ?>
    <meta name=”robots” content=”noindex, nofollow” />
    <?php }?>

    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘stylesheet_url’); ?>” media=”screen” />
    <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘template_url’); ?>/styles/nav.css” type=”text/css” media=”screen” />
    <link rel=”shortcut icon” href=”<?php bloginfo(‘template_url’); ?>/images/favicon.ico” />

    <script type=”text/javascript” src=”<?php echo bloginfo(‘template_url’); ?>/scripts/slider.js”></script>
    <script type=”text/javascript” src=”<?php echo bloginfo(‘template_url’); ?>/scripts/dropdowns.js”></script>
    <script type=”text/javascript” src=”<?php echo bloginfo(‘template_url’); ?>/scripts/featuredcontentglider.js”></script>
    <script type=”text/javascript” src=”<?php echo bloginfo(‘template_url’); ?>/scripts/jquery-1.2.3.pack.js”></script>

    <script type=”text/javascript”>
    featuredcontentglider.init({
    gliderid: “headline-content”,
    contentclass: “glidecontent”,
    togglerid: “teaser”,
    remotecontent: “”,
    selected: 0,
    persiststate: false,
    speed: 300,
    direction: “leftright”,
    autorotate: true,
    autorotateconfig: [100, 0]
    })
    </script>
    <?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?>

    <script type=”text/javascript”>
    menuscript.definemenu(“tab_menu”, 0)
    </script>

    <?php wp_head(); ?>
    </head>
    <body>
    <div id=”page-wrap”>
    <div id=”header”>
    <div id=”logo”>
    <h1><a href=”<?php echo get_option(‘home’); ?>/”><?php bloginfo(‘name’); ?></a></h1>
    <h2><?php bloginfo(‘description’); ?></h2>
    </div>

    <div id=”search”>
    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
    </div>

    </div> <!– end header –>

    <div id=”main-wrap”>
    <div id=”menu”>
    <ul>
    <li><a href=”<?php echo get_option(‘home’); ?>”>Home</a></li>
    <?php wp_list_pages(‘title_li=’); ?>
    <li><a href=”<?php bloginfo(‘rss2_url’); ?>”>RSS</a></li>
    <li><a href=”<?php bloginfo(‘rss2_url’); ?>”><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/feed.png” alt=”RSS” /></a> </li>
    </ul >
    </div> <!– end nav –>

    <div id=”categ”>
    <ul id=”nav” class=”clearfloat”>
    <li><a href=”<?php echo get_option(‘home’); ?>/” class=”on”>Home</a></li>
    <?php wp_list_categories(‘orderby=ID&order=ASC&depth=3&title_li=&exclude=’); ?>
    </ul>
    </div> <!– end categ –>

    <div id=”content-wrap”>`

    And I want a menu like this one : https://groweb.fr/wordpress-creer-un-menu-deroulant-categories-et-pages/

    But when I put this code `<ul id=”nav2″ class=”clearfloat”>
    <li>
    <ul>”;
    wp_list_categories(‘orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of=’.$this_category->cat_ID);
    echo “</ul>
    </li>
    $this_category = get_category($cat);
    if (get_category_children($this_category->cat_ID) != “”) {
    echo “”;
    }
    ?></ul>`

    I get this error : $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo ""; } ?>

    Can you guys help me?

    Thanks.

  • The topic ‘Problem with my menu’ is closed to new replies.