OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Current page name missing when widget embedded via shortcode in a page

Resolved

Requested: 2 years and 7 months ago

This is a weird one, but I’m trying to embed an instance of your widget in a Gutenberg block via a shortcode. It works great, but the current page name isn’t being returned. When I inspect-element, I can see empty <a> tags with the correct URL for the current page in the href field, just no page name inside the link. I suspect the page name isn’t specifically referencing the current post_id, maybe in get_the_title()?

Thanks for your help! Cheers,

Michelle

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    2 years and 7 months ago

    Hi Michelle,

    Can you tell me a bit more about how you are using the widget via a shortcode so we may recreate?

    Thank you!

  2. Michelle

    2 years and 7 months ago

    I’m using Extended Widget Options (the paid version of Widget Options by Jeffrey Cardarang) which generates a shortcode for every widget. Like I said, everything works exactly as expected except for the title of the current page / post not being output. Thanks!

  3. OnPoint Plugins

    2 years and 7 months ago

    Hi Michelle,

    As I am not familiar with this plugin not do I have access to it, would it be possible to send me the following:

    1.  A link to download the plugin (through the Private Information).
    2. Some basic instructions to recreate the scenario using the plugin which will allow me to see what is happening.

    Thank you!

  4. Michelle

    2 years and 7 months ago

    Sure thing. Here are the instructions, plugin link is (temporarily) available in the Private info area.

    Once you’ve installed the plugin, go to Settings > Widget Options and Enable the “Shortcodes” option. Then go to Appearance > Widgets and add your Advanced Sidebar Pages widget using a setting that would show the current page in the list generated by the widget. After you click “Save” on the widget you’ll see a shortcode at the bottom which you can copy/paste into Page content. You’ll see that the sidebar-version of the widget outputs the current Page Title, but the embedded shortcode version does not.

    Thanks for your help!

  5. OnPoint Plugins

    2 years and 7 months ago

    Good Morning Michelle,

    So far I have been unable to recreate the issue. I’ve tried:

    1. Pages menu.
    2. Navigation menu.
    3. Shortcode on top level page.
    4. Shortcode on child level page.
    5. Shortcode on grandchild level page.
    6. Using a custom title.
    7. Using a blank title.
    8. Using the default title.

    In all cases, the current page’s title displayed as expected in both the sidebar widget and the shortcode output. Whatever the issue is, it’s not a conflict between these two features.

    One thing I can suggest is adding the following call to your active theme’s functions.php file to rule out another theme or plugin doing something with the title using the default filter:

    Also, checking to make sure you are on the latest version of all 3 plugins may help as I am testing against the latest of all.

  6. Michelle

    2 years and 7 months ago

    Hi! So sorry for the slow response, somehow missed this when you first sent it. 🙂

    I copied the site down and was able to do the full disable-everything test and discovered it was a conflict with the EditorsKit plugin. I’ll contact the developer and let him know.

    Thanks so much for your hep!!!

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2023 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact