Support » Plugin: WP Glossary » Only “S” link not working when using glossary_atoz shortcode

  • This is very strange: Only the “S” link does nothing when selected. However, if either the “S” glyph is selected directly to left or right, it works. All other letters work fine.

    See website for demo: http://tnb.zdca.biz/glossary-terms-definitions/

    This seems to be a theme related issue though there’s nothing in the theme that seems suspect. I’m using latest Divi Version: 3.0.23 by Elegant Themes (the problem doesn’t happen on WP Twentysixteen default theme). I deactivated all plugins and striped down the content to just the [glossary_atoz /] shortcode on a plain WP Page with the same wrong behavior (when in Divi). Also, played with the few settings in the plugin’s options area without success.

    I looked for an name=”s” anchor attribute or other #s link in case there is a conflict, but cannot find anything in the code. There is a search input field in the header that has name=”s” attribute and I manually removed it from the Divi theme header, but it did not fix the problem.

    Anyone have a clue what’s happening and how to fix? Obviously this is a complete show stopper and I can’t go live with this issue.

    • This topic was modified 2 years, 9 months ago by  cliffordhill.
    • This topic was modified 2 years, 9 months ago by  cliffordhill.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Clifford,
    Several years ago I coded a glossary for a web site and had ‘A to Z’ near the top of the page. I had the same problem with the ‘S’. I decided it was caused by the Search at the top of the page, but could not fix the problem and moved on to more important issues and forgot about it. Today I rediscovered the issue and while searching came across your post. I ran a search through the WordPress files and came across the following:

    <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    <input type="text" value="' . get_search_query() . '" name="s" id="s" />
    <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    <input type="text" value="' . get_search_query() . '" name="s" id="s" />

    I tried to put some code my child functions file to change the query variable, but have not yet found a way to override the ‘s’.
    I am surprised that a plugin would not have taken care of that issue and will be interested to see, if anyone can propose an answer.

    Eureka!
    After I wrote the above I realised that I had been trying to fix the problem the hard way. I opened to the Glossary page in Edit mode and changed
    <a href="#s">S</a> to <a href="#ss">S</a> in the A to Z list near the top of the page and
    <a name="s"></a>S to <a name="ss"></a>S at the ‘S’ section of the page.
    It now works normally.
    I don’t know how your plugin works, but this may help you to find a solution.

    Thanks @malae for posting ideas! Unfortunately, the only way to change what the plugin calls on the S link is to alter core plugin files which would be overwritten when (if) the plugin is updated. Still that’s a small change that can be made without much fuss. Just have to remember that the change is sitting there in the future (which will likely be forgotten, of course).

    I tried using a functions.php snippet that kills the WordPress native search but that did not fix the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only “S” link not working when using glossary_atoz shortcode’ is closed to new replies.