WordPress.org

Forums

Custom Menu Images
Generated CSS path is giving 404 error (14 posts)

  1. smortv
    Member
    Posted 3 years ago #

    Within the front_end_head() function, $menu->term_id is not giving me the same value as $parentID within the save_config() function.

    The end result is I have a stylesheet generated from the plugin as: custom_menu_images_3.css, but in the head of my document it's looking for: custom_menu_images_6.css?ver=3.1.2

    Great plug-in, I'm looking forward to using it regularly.
    Thanks

    -Sam

  2. mediopirzel
    Member
    Posted 3 years ago #

    Same problem here.
    In my header there is this link "custom_menu_images_.css?ver=3.1.2" but the css file is "custom_menu_images_4.css"

  3. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    How are you calling the menu?

    Is it registered via functions.php or just called in the theme?

  4. smortv
    Member
    Posted 3 years ago #

    My menu is registered via functions.php:

    register_nav_menus( array(
    		'primary' => __( 'Primary Navigation', 'rek' ),
    	) );

    Then called in my header.php:

    $args = array(
      'theme_location'  => 'primary',
      'container'       => 'div',
      'container_class' => 'menu_header',
      'menu_class'      => 'menu',
      'echo'            => true,
      'fallback_cb'     => 'wp_page_menu',
      'depth'           => 0,
       );
    wp_nav_menu($args);

    [please format code using the code formatting button]

  5. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for your feedback,

    Let us check and get back to you.

  6. mediopirzel
    Member
    Posted 3 years ago #

    Hi Anabelle,
    My code is very simple

    functions.php:
    add_action( 'init', 'register_my_menus' );

    then in header.php:
    wp_nav_menu( array('menu' => 'principal' ));

  7. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks.

    Sorry for the inconviniences, we figured out a better way of doing this.

    Comming next week

    :)

  8. smortv
    Member
    Posted 3 years ago #

    Great, glad to hear it.

    I'll be looking forward to the next release.

  9. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    I'll be sure to let you know.

    We will generate a single css file with a unique url and all multiple menus css apended to it.

    What do you think? Any better ideas?

  10. smortv
    Member
    Posted 3 years ago #

    Hi Anabelle, I think that's a good idea.

    In my case, I'll only be using the navigation icons on my primary menu, however if I were using multiple menus with icons I would definitely prefer having all css within one file rather than the plugin making separate requests for each stylesheet.

    Two more unrelated items I'll mention...

    1. When adding an icon image the thickbox popup isn't able to fit the content of the wordpress image uploader/library (see example)
    Not a major issue, but slightly annoying. Looks like the thickbox width should be somewhere around 670px to fit everything.

    2. Originally when I was trying to get the plugin working I first specified an image URL and then decided to use the library instead. Even after selecting the "From Media Library" radio button, the input for the icon url was kept. I became unclear if that was something I had to manually clear before my library selection would work.

    I would either have the url input field cleared when the From Media Library option is selected, or simply add a margin on the bottom of the url input field to keep the two options a bit more separate.

    Thanks again for your work on this plugin.

  11. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Thanks a lot for yout great feedback,

    This will all come in the next version :)

  12. anabelle
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    We have just released a new version that greatly improves CSS generation and handling for multiple menus.

    :)

  13. smortv
    Member
    Posted 3 years ago #

    Works good! On the site I was previously testing the plugin with it saves my menu icons but gives a warning.

    Warning: Invalid argument supplied for foreach() in /home4/yyyyy/public_html/xxxxx/wp-content/plugins/custom-menu-images/custom-menu-images.php on line 150

    I installed the plugin on another site (fresh install of the plugin) and it didn't give me the error, so perhaps it's because I upgraded the plugin vs a fresh install (or maybe it's just conflicting with another plugin).

    I'll post if I notice any bugs, but it's working good and my icons are showing up.

    Thanks!

  14. webrob
    Member
    Posted 3 years ago #

    I am getting the same

    Warning: Invalid argument supplied for foreach() in /home/lifetole/public_html/wp-content/plugins/custom-menu-images/custom-menu-images.php on line 150

    I have used this plugins on other sites with no problems. This just came up today.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic