ThemeShaper Forums » Thematic

div id vs. class

(3 posts)
  • Started 5 years ago by toma
  • Latest reply from toma
  • This topic is resolved
  1. toma

    I have been playing around with a child theme called BLAMatic.
    It looks really good but seems to have a few issues.

    One of these issues is the way the nav is layed out.
    By trying my luck with firebug, I finally found what I wanted to edit, but I have no idea how to edit it :/

    My HTML looks like that :
    <div id="header">
    <div id="branding">
    <div id="access">
    <div class="skip-link">
    <div class="menu">

    And It seems that it should look like that :
    <div id="header">
    <div id="branding">
    <div id="access">
    <div class="skip-link">
    <div id="menu">

    Notice that for the "menu", I have <div id instead of <div class

    In which file would I be able to make that change permanently please?
    I hope the question is not too dumb...

    Thanks for your help

    Posted 5 years ago #
  2. Hey,

    try this one in your child theme's functions.php:

    function change_menu($menu) {
    	$menu = str_replace('<div class="', '<div id="', $menu);
    	return $menu;
    add_filter('wp_page_menu', 'change_menu');



    Posted 5 years ago #
  3. toma

    thanks a lot Chris

    Posted 5 years ago #

RSS feed for this topic


You must log in to post.