Shortcode Affecting Dropdowns
-
With the use of your plugin I was finally able to get a CTA in the upper right corner on the same line as the menu items instead of above. However, it is affecting the dropdown menu spacing and I can’t get it to close the large gap between the main menu and the sub-menu items.
The page I need help with: [log in to see the link]
-
Also, I cannot get it to show a rev slider sliders.
Take a look at the “gap” in your browser’s inspector. It looks like this plugin inserts a blank <li> element before the shortcode’s output, which might be appearing as a blank first menu item.
EDIT: Confirmed. I created a shortcode with output that is wrapped in “<!– START SC –>” and “<!– END SC –>” tags. This plugin added extra <li>…</li> tags around the “<!– START SC –>”. I’m not sure but this appears to be because it calls WordPress’s core menu walkers, and assumes your shortcode isn’t already outputing menu-ready content. Frustratingly, it doesn’t produce consistent classes or ID, they depend on the surrounding elements, so it’s harder to hide this extraneous <li> with CSS.
Question, I see this post is over a month old, is this plugin still maintained?- This reply was modified 1 year, 3 months ago by synthezoid. Reason: found more info
Apologies for the delayed response.
While the plugin does enable you to insert shortcodes directly into menus, it doesn’t automatically adapt the shortcode’s output to fit your theme’s menu structure. Therefore, it’s crucial for you to manually wrap the shortcode in the appropriate HTML tags as needed to ensure compatibility when needed.
You can find a visual guide on how to do this by referring to the following screenshot:
https://ps.w.org/shortcode-in-menus/assets/screenshot-3.png?rev=1018011For a more detailed walkthrough, you can consult this tutorial:
This tutorial will help you understand how to wrap the shortcode with the necessary HTML tags and classes to achieve the desired appearance and functionality.
Rest assured, the plugin is actively maintained for compatibility with new WordPress releases. Limited version updates are intentional to avoid feature bloat. I test the plugin with each WordPress release to ensure it remains stable and functional.
I hope this answers your query and provides ample information to fix the issue on your site.
Additional Info:
<li id="menu-item-4306" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4306"><a href="https://www.bedforddancecenter.com/testimonials/">Testimonials</a></li><li id="menu-item-5685" class="menu-item menu-item-type-gs_sim menu-item-object-gs_sim menu-item-5685"> <!-- START Slider1 REVOLUTION SLIDER 6.6.8 --><p class="rs-p-wp-fix"></p> <rs-module-wrap id="rev_slider_10_2_wrapper" data-alias="slider-1" data-source="gallery" style="visibility:hidden;background:transparent;padding:0;margin:0px auto;margin-top:0;margin-bottom:0;max-width:none;"> <rs-module id="rev_slider_10_2" style="" data-version="6.6.8"> <rs-slides style="overflow: hidden; position: absolute;"> <rs-slide style="position: absolute;" data-key="rs-24" data-title="Slide" data-in="o:0;" data-out="a:false;"> <img src="//www.bedforddancecenter.com/blog/wp-content/plugins/revslider/public/assets/assets/dummy.png" alt="Slide" title="Home" class="rev-slidebg tp-rs-img rs-lazyload" data-lazyload="https://www.bedforddancecenter.com/blog/wp-content/plugins/revslider/public/assets/assets/transparent.png" data-no-retina><!-- --><a id="slider-10-slide-24-layer-1" class="rs-layer" href="https://www.bedforddancecenter.com/tuition-registration/free-trial-dance-class-inquiry/" target="_self" data-type="shape" data-xy="xo:418px,310px,188px,39px;yo:1px,0,0,0;" data-text="w:normal;s:20,16,12,7;l:0,20,15,9;" data-dim="w:204px;h:150px;maxw:196px,none,none,none;maxh:150px;" data-rsp_o="off" data-rsp_bd="off" data-frame_0="tp:600;" data-frame_1="tp:600;" data-frame_999="o:0;tp:600;st:w;sR:8700;" data-frame_hover="bgc:rgba(199,199,204,0.25);e:sine.inOut;bri:90%;" style="z-index:8;" > </a><!--
--><a id="slider-10-slide-24-layer-2" class="rs-layer" href="https://www.bedforddancecenter.com/tuition-registration/registration/" target="_self" data-type="shape" data-rsp_ch="on" data-xy="xo:620px,512px,389px,242px;" data-text="w:normal;s:20,16,12,7;l:0,20,15,9;" data-dim="w:200px;h:150px;maxh:150px,150px,150px,none;" data-frame_0="tp:600;" data-frame_1="tp:600;" data-frame_999="o:0;tp:600;st:w;sR:8700;" data-frame_hover="bgc:rgba(199,199,204,0.25);e:sine.inOut;bri:90%;" style="z-index:7;background-color:rgba(142,142,147,0);" > </a><!--
--><rs-layer id="slider-10-slide-24-layer-4" data-type="image" data-rsp_ch="on" data-xy="xo:418px,345px,262px,161px;" data-text="w:normal;s:20,16,12,7;l:0,20,15,9;" data-dim="w:400px,330px,250px,154px;h:150px,123px,93px,57px;" data-frame_999="o:0;st:w;" style="z-index:6;" ><img src="//www.bedforddancecenter.com/blog/wp-content/plugins/revslider/public/assets/assets/dummy.png" alt="" class="tp-rs-img rs-lazyload" width="400" height="150" data-lazyload="https://www.bedforddancecenter.com/blog/wp-content/uploads/2023/08/BDC-5191.png" data-no-retina> </rs-layer><!----> </rs-slide> </rs-slides> </rs-module> <script> setREVStartSize({c: 'rev_slider_10_2',rl:[1240,1024,778,480],el:[150,768,960,150],gw:[1240,1024,778,480],gh:[150,150,150,150],type:'standard',justify:'',layout:'fullwidth',mh:"0"});if (window.RS_MODULES!==undefined && window.RS_MODULES.modules!==undefined && window.RS_MODULES.modules["revslider102"]!==undefined) {window.RS_MODULES.modules["revslider102"].once = false;window.revapi10_2 = undefined;if (window.RS_MODULES.checkMinimal!==undefined) window.RS_MODULES.checkMinimal()} </script> </rs-module-wrap> <!-- END REVOLUTION SLIDER --></li>
- The topic ‘Shortcode Affecting Dropdowns’ is closed to new replies.