Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Nextendweb

    (@nextendweb)

    Hi!

    You should be able to add your own icons into the following folders:

    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/default/minus/
    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/default/plus/

    Thread Starter donnahaynes

    (@donnahaynes)

    Hi there,
    Thanks for the fast response ??
    That doesn’t seem to work. Should the files I place in those directories have a certain name? I named mine plus.png and minus.png, in their respective folders.
    Is there something else I would need to change? i.e. in the back end “Opened State” and “Closed State” settings?
    I have been able to use my own icons if I replace the icons in these folders:
    \plugins\nextend-accordion-menu\library\assets\accordionmenu\images\default\plus
    \plugins\nextend-accordion-menu\library\assets\accordionmenu\images\default\minus
    But I don’t want to do that as they will get overwritten if the plugin gets updated…
    Thanks,
    Donna

    Plugin Author Nextendweb

    (@nextendweb)

    Hey,
    we tried and it worked for use with jpg and png images.

    You should copy your custom image into this folders:
    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/default/minus/
    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/default/plus/

    Then those images should appear in the Accordion Menu configuration where you can choose it for your menu theme. Does your image appear on the admin interface in the image selector of the Accordion Menu?

    Plugin Author Nextendweb

    (@nextendweb)

    Also if your have pro version, then the path can be different as you have more than the default theme for the Accordion Menu:
    [YOUR-ACCORDION-MENU-THEME] can be the followings: default, elegant, clean

    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/[YOUR-ACCORDION-MENU-THEME]/minus/
    …./wp-content/themes/[YOUR-THEME]/accordionmenu/images/[YOUR-ACCORDION-MENU-THEME]/plus/

    Thread Starter donnahaynes

    (@donnahaynes)

    Hi there,
    I don’t have the Pro version…
    No, the images don’t appear in the theme configuration screen.
    I have a slightly different content directory though – do you think that might make a difference?
    These are the paths I have added:
    \content\themes\outreach-pro\accordionmenu\images\default\plus
    \content\themes\outreach-pro\accordionmenu\images\default\minus
    (Note “content” instead of “wp-content”)

    Plugin Author Nextendweb

    (@nextendweb)

    Okay, please go to the configuration screen of your Accordion Menu, like the following url:

    https://****.com/*****/wp-admin/post.php?post=*******&action=edit

    and add the following parameter: nextendpath=1

    Result url:
    https://****.com/*****/wp-admin/post.php?post=*******&action=edit&nextendpath=1

    Then in the theme parameter, click on the Configure button. The image list parameter will print out the path where it tries to look for extra images.

    What is the path you get?

    Thread Starter donnahaynes

    (@donnahaynes)

    ??
    It’s reading my parent theme: Genesis:
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/genesis/accordionmenu/images/default/minus/
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/genesis/accordionmenu/images/default/plus/
    I’m using a Genesis child theme. So I put my custom icons in my Genesis folder, and now they appear.
    But.. I still don’t really want to be putting customisations in the Genesis folder, I’d rather just have them in my child theme. Is that possible? Sorry for being complicated!
    Thanks for your help,
    Donna

    Plugin Author Nextendweb

    (@nextendweb)

    Well, we are just getting the WordPress template path and it seems like that always returns with the parent template path.

    Please open the following file:

    wp-content/nextend-accordion-menu/nextend/form/element/imagelist.php

    Find this line:
    $files = NextendFilesystem::files($this->_folder);

    and replace with:

    $wpfolder = get_stylesheet_directory().'/'.NextendXmlGetAttribute($this->_xml, 'folder').'/';
    if(isset($_GET['nextendpath'])) echo $wpfolder."<br />";
    if(NextendFilesystem::existsFolder($wpfolder)){
    $wpfolder = get_template_directory().'/'.NextendXmlGetAttribute($this->_xml, 'folder').'/';
    }

    This code will be part of the next update. It will try to look for the images in the child theme first.

    Thread Starter donnahaynes

    (@donnahaynes)

    Hi again,

    I have changed that code, and moved my custom images into my child theme. But now I get no images showing up at all in the theme config screen.

    Output for the nextendpath parameter is:
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/outreach-pro/accordionmenu/images/default/minus/
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/genesis/accordionmenu/images/default/minus/
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/outreach-pro/accordionmenu/images/default/plus/
    C:\xampp\htdocs\YorkePeninsulaCouncil/content/themes/genesis/accordionmenu/images/default/plus/

    Outreachpro is my child, Genesis is my parent.

    If I move the custom images back into the parent theme, I get only the custom images showing up in the configure screen (which is fine, but I think before the code update I got the default ones AND my custom ones.)

    PS I just updated Nextend to the latest version (before I applied the code you supplied): 9.3.0

    Thanks

    Plugin Author Gabor

    (@nextendweb_gabor)

    Hi Donna!
    You should use our latest installer’s file now, so without your changes, and replace this function in this file:
    wp-content\plugins\nextend-accordion-menu\nextend\form\element\imagelist.php
    line 18.:
    get_template_directory()
    to:
    get_stylesheet_directory()
    because the get_template_directory seems to only return the parent theme’s path, but the get_stylesheet_directory will return the active theme’s path, even if it’s a child theme.

    Thread Starter donnahaynes

    (@donnahaynes)

    Hi,
    Great, that works. Thank you!
    So… will this change be in the next update of the plugin?

    Plugin Author Gabor

    (@nextendweb_gabor)

    Yes, we will put this into our installer!

    Thread Starter donnahaynes

    (@donnahaynes)

    Hi there,
    I just installed the latest version of your plugin, and I’m again getting the above issue.
    The manual fix you helped me with above worked, the new update doesn’t.
    Any ideas?
    Let me know what further information you need.
    Thanks

    Plugin Author Gabor

    (@nextendweb_gabor)

    Hi Donna!

    I’m not so sure, because in line 18. if you look at the installer same file, you will see, that it has the get_stylesheet_directory.

    I can see, that in the trial version there is also another get_template_directory, at line 21. (same file: wp-content\plugins\nextend-accordion-menu\nextend\form\element\imagelist.php) Did you had to change that too?

    I found that the images had to be in my parent theme. The nextendpath parameter showed both parent and child paths but only the parent path worked.

    Changing line 21 fixed it (using the latest WordPress plugin download).

    [There also seemed to be a problem with using the colorise option with jpgs rather than pngs.]

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Custom open and close icons’ is closed to new replies.