Results 1 to 2 of 2

Thread: Custom categories listing

  1. #1
    Thread Starter
    p0pemar1naru's Avatar
    Join Date
    Oct 2012
    Location
    Toronto, ON
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom categories listing

    Why I cannot un-hook "insert_dropdown()" function from "walker_nav_menu_start_el" filter?

    I want to render the categories listing in a different way.
    Here's my code in "fuctions.php" file of my child theme.

    Code:
    add_action('appthemes_init', 'ntdi_do');
    
    /**
     * Removes default 'insert_dropdown' function attached to 'walker_nav_menu_start_el' hook and add my own
    */
    function ntdi_do()
    {
      remove_filter( 'walker_nav_menu_start_el', array('CP_Ads_Categories', 'insert_dropdown'), 10, 4 );
    
     // this NTDI_Ads_Categories class is similar to CP_Ads_Categories but with the "insert_dropdown" function modified to my needs
      $menuCats = new NTDI_Ads_Categories();
      add_filter('walker_nav_menu_start_el', array($menuCats, 'insert_dropdown'), 10, 4);
    }
    The result is that now I've got 2 navs containers overlapped. My custom one and the default one since the remove filter wasn't working...

    Here is the preview:
    nav.jpg

    Thks,
    NickT

  2. #2
    Thread Starter
    p0pemar1naru's Avatar
    Join Date
    Oct 2012
    Location
    Toronto, ON
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Listing categories missing in custom form in Chrome
    By shunarjuna in forum Report Vantage Bugs (Legacy)
    Replies: 17
    Last Post: November 21st, 2012, 04:53 PM
  2. ANy way to get the Menu creater to use listing categories, not post categories
    By cohsmama in forum Report Vantage Bugs (Legacy)
    Replies: 1
    Last Post: August 24th, 2012, 06:48 PM
  3. Menu using post categories rather than listing categories?
    By cohsmama in forum Report Vantage Bugs (Legacy)
    Replies: 7
    Last Post: August 13th, 2012, 10:42 PM
  4. Inserting a custom field from a custom form into the listing preview
    By Fanatic in forum ClassiPress General Discussion
    Replies: 4
    Last Post: May 1st, 2011, 06:17 PM
  5. Categories listing...
    By maverick in forum ClassiPress General Discussion
    Replies: 1
    Last Post: January 15th, 2011, 01:36 AM