Title: New PHP code error
Last modified: June 9, 2022

---

# New PHP code error

 *  [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/)
 * There is a error in the code at line:3 What is it?
 * syntax error, unexpected ‘.’, expecting end of file
 *     ```
       /* Adds an arrow next to menu items with sub menus */
       /* You will most likely need to adjust this per site ~~~~~~~~~~~~~~~~~~~~~ */
       .fusion-flyout-mobile-menu .menu-item-has-children > a span::after {
           content: '\e61f';
           display: inline-block;
           font-family: icomoon;
           font-size: 18px;
           width: 18px;
           line-height:35px;
           color:#fff;
           position: static;
       	margin-left: 1em;
       }
   
   
       /* These will most likely be fine as they are ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
       /* Theis makes it so you can't scroll away from the menu and search icons */
       .fusion-flyout-active .fusion-header-has-flyout-menu-content {
           position: fixed;
           width:calc(100% - 60px);
       }
   
       /* This makes the current nav item open by default */
       .fusion-flyout-mobile-menu.fusion-mobile-nav-holder .menu-item-has-children.fusion-mobile-current-nav-item .sub-menu {
       	display: block;
       }
       ```
   
    -  This topic was modified 3 years, 11 months ago by [martini0](https://wordpress.org/support/users/martini0/).
    -  This topic was modified 3 years, 11 months ago by [martini0](https://wordpress.org/support/users/martini0/).

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [Weboccult Technologies Pvt Ltd](https://wordpress.org/support/users/weboccults/)
 * (@weboccults)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723077)
 * Hi [@martini0](https://wordpress.org/support/users/martini0/)
 * The code you have shared is css code. Can you share php code or website link 
   having above error ? so i can check for you in detail
 * Thanks
 *  [thelmachido a11n](https://wordpress.org/support/users/thelmachido/)
 * (@thelmachido)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723083)
 * Hi there,
 * The code you provided looks like it’s from the theme you are using not WordPress
   core files. On this forum, you can only get assistance with issues that arise
   from WordPress core files.
 * Can you please check the theme you are using, and reach out to their support 
   so that the developers can have a look and advise what the issue is.
 * Is there anything that isn’t working on the site that you believe is related 
   to the WordPress core files?
    -  This reply was modified 3 years, 11 months ago by [thelmachido a11n](https://wordpress.org/support/users/thelmachido/).
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723136)
 * Oh sorry about that, it is indeed Css. I am trying to make the submenus visable
   on my flyout menu. The link to do it is here.
 * [https://snippets.cacher.io/snippet/ca1e6113238f63163ac4](https://snippets.cacher.io/snippet/ca1e6113238f63163ac4)
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723143)
 * This was the PHP code with an error. Line 5
 * syntax error, unexpected ‘(‘, expecting variable (T_VARIABLE) or ‘{‘ or ‘$’
 *     ```
       //enable child menu items on mobile flyout menu (works like an accordion element)
       //Must be inside an on ready function
       function menuSetup() {
           //enable child menu items on mobile flyout menu (works like an accordion element)
           $('.fusion-flyout-menu .menu-item-has-children > a').click(function(e) {
             e.preventDefault();
   
             $('.fusion-flyout-menu .menu-item-has-children.open > .sub-menu').not($(this).next('.sub-menu')).slideUp();
             $('.fusion-flyout-menu .menu-item-has-children.open').not($(this).parents('.menu-item-has-children')).toggleClass('open');
   
             console.log($(this));
             console.log($(this).parents('.menu-item-has-children'));
             $(this).parents('.menu-item-has-children').toggleClass('open');
             $(this).next('.sub-menu').slideToggle();
           });
       }
       ```
   
    -  This reply was modified 3 years, 11 months ago by [martini0](https://wordpress.org/support/users/martini0/).
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723581)
 * That’s javascript, not PHP. Since you don’t seem to know the difference between
   CSS, javascript, and PHP, perhaps you would be better off hiring someone to do
   this for you…
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723610)
 * I understand your point, but I do know the difference between css & the other
   2. However, I am no programmer.
 * Could you tell me how I can enable submenus on my flyout menu? I use Avada.
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723619)
 * [https://snippets.cacher.io/snippet/ca1e6113238f63163ac4](https://snippets.cacher.io/snippet/ca1e6113238f63163ac4)
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723641)
 * The css part is working now 🙂 but how do i do javascript?
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15723861)
 * I found where to place the Javascript. But its not working. Does anybody know
   how to fix it?
 *     ```
       function menuSetup() {
           //enable child menu items on mobile flyout menu (works like an accordion element)
           $('.fusion-flyout-menu .menu-item-has-children > a').click(function(e) {
             e.preventDefault();
   
             $('.fusion-flyout-menu .menu-item-has-children.open > .sub-menu').not($(this).next('.sub-menu')).slideUp();
             $('.fusion-flyout-menu .menu-item-has-children.open').not($(this).parents('.menu-item-has-children')).toggleClass('open');
   
             console.log($(this));
             console.log($(this).parents('.menu-item-has-children'));
             $(this).parents('.menu-item-has-children').toggleClass('open');
             $(this).next('.sub-menu').slideToggle();
           });
       }
       ```
   
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15724108)
 * Avada is a premium theme, and support for premium themes on wordpress.org is 
   not allowed.
 * You should ask your question wherever Avada is supported.
 *  Thread Starter [martini0](https://wordpress.org/support/users/martini0/)
 * (@martini0)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15724157)
 * Dion doesn’t sound Russian. Are you sure your name is not Sergey?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15726121)
 * > Dion doesn’t sound Russian. Are you sure your name is not Sergey?
 * I’ve no idea what that means but Dion’s right.
 * For pro or commercial product support please contact the developer directly on
   their site. This includes any pre-sales topics as well.
 * [https://theme-fusion.com/support/](https://theme-fusion.com/support/)
 * As the developer is aware, commercial products are [not supported in these forums](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
   I am sure they will have no problem supporting you there.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘New PHP code error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 5 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/new-php-code-error/#post-15726121)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
