• I’m not having much luck with the forums. Here’s another shot at it.

    My goal is to integrate my current menu for the rest of my site, with wordpress. My current menu is generated dynamically using other software and it is written for that. It can’t be modified for wordpress because of the complexities.

    Anyway. I’m 99% of the way to creating the same menu by modifying the wordpress walker_category class (yup, i’ll rename everything afterwords so that it won’t screw-up the existing menu (which I want to use in my sidebar with “is_” conditions).

    I’ve got the special list structure(stu’s made it compatible with all browsers) in place by using if-else statements. My last task is to create a special css-class for the link tags which will allow me to indicate which categories have sub-categories with background images.

    I’ve been at this for a two days because I am not that familiar with php classes and objects.

    I created this fancy dancy function below.
    and confirmed that it is working with the little if at the bottom.
    function is_parent_id($cat_id_num){
    global $wpdb;
    $p_id = $wpdb->get_col("select category_parent from $wpdb->categories where category_parent>0");
    if (in_array($cat_id_num,$p_id )){
    $result = $cat_id_num;
    return $result;
    }
    }
    $current_cat = ($_GET['cat']);
    if ((isset($current_cat)) && (is_parent_id($current_cat)==3)) {
    echo 'it is equal';
    }else{
    echo 'you are in the wrong category';
    }

    I want to integrate this into the walker_category class, so that the class, namely the ‘start_el’ function, will have the array on hand to compare the current category id to the values in the array.

    I have tried in vain to place it into the function, into the class, into the classes.php file as it’s own class or function. All instances create either an error or don’t do what I am trying to accomplish.

    What I am thinking is that if I can somehow get the array into the $wp_query, then I can test for the values with that.

    Anybody have a thought, notion or crazy idea to make this work?? I’d be happy to put the code out there when this is solved.

    Thanks again,
    Sheri

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter muskokee

    (@muskokee)

    Oh well. Thanks anyway. I decided that hacking the code was useless. It wasn’t written the way I needed it to be. So I wrote my own code.

    & not that I’m slamming anyone, because I hate when people complain on free-help forums but I have never been involved with a forum where no one replied at all.

    This was my first use of wordpress and it’ll be my last.

    Muskokee,

    I’m reading yours, don’t give up. I’ve been with WP for more than a year even those frequent helpers here could be very busy. Hacking the core isn’t for everyone I guess and I’m also finding my way slowly.

    I also like creating customized looks/functionalities. I guess it’ll better adding things outside the core.

    Truth be told, I find the forum system a little haphazard… though I’m sure it has its plus points, I’m just more used to to the systematic method of the standard vBulletin/IPB/phpBB/SMF etc. boards.

    Hope you are still continuing development with WordPress ?? I wish I could help but as a new person alas I can only hang around and ask questions.

    Thread Starter muskokee

    (@muskokee)

    Thanks Mosey and sfong15. I still have my wordpress blog. I guess I am just used to more active forums with a greater number of developers. I discovered that the default category list was just not creating the menu in the proper way so I created my own. The link is in this thread: drop down menu Thanks again for the support ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘creating a cssplay.co.uk drop down menu for wordpress’ is closed to new replies.