WordPress.org

Ready to get started?Download WordPress

Forums

WP Glossary
[resolved] glossary_atoz in single-glossary.php (8 posts)

  1. Garadur
    Member
    Posted 1 year ago #

    For easier navigation I'd like to have the "A to Z" navigation always over the glossary article.

    [glossary_atoz] doesn't seem to work within templates.
    Is there any way to achieve that?

    http://wordpress.org/extend/plugins/wp-glossary/

  2. Cory Jaccino
    Member
    Posted 1 year ago #

    Also, if a click on a letter or number within the "A to Z" portion (at the top) would send the user to that letter or number's section below, that would improve the user experience as the user could more quickly find and select the glossary term desired.

  3. TCBarrett
    Member
    Plugin Author

    Posted 1 year ago #

    1. Glossary mini-menu is a nice idea.
    2. How do you mean 'within templates'. If you are creating page templates you need to use do_shortcode() in your PHP to invoke shortcodes.

  4. Garadur
    Member
    Posted 1 year ago #

    Thanks TCBarrett, that's exactly what I'm trying to do. But it didn't work just yet. It's probably something minor.

    I have put the following into glossary-single.php

    <?php do_shortcode('glossary_atoz'); ?>

    I also tried it with [] around the tag and with the corresponding tag I found in the $shortcodes array.

  5. TCBarrett
    Member
    Plugin Author

    Posted 1 year ago #

    <?php echo do_shortcode('[glossary_atoz]'); ?>
  6. Garadur
    Member
    Posted 1 year ago #

    Duh!
    I knew it was something stupid!

    Thanks for the help, it worked!

  7. Vernon Fowler
    Member
    Posted 1 year ago #

    Garadur, I think the file name needs to be single-glossary.php rather than glossary-single.php
    Perhaps a typo but for anyone else wanting to implement. Also, archive-glossary.php may be worth adding to your child theme too.
    http://codex.wordpress.org/images/1/18/Template_Hierarchy.png is a useful reference, along with http://codex.wordpress.org/Child_Themes#Template_files.

  8. Vernon Fowler
    Member
    Posted 1 year ago #

    Garadur, I think the file name needs to be single-glossary.php rather than glossary-single.php
    Perhaps a typo but for anyone else wanting to implement. Also, archive-glossary.php may be worth adding to your child theme too.
    http://codex.wordpress.org/images/1/18/Template_Hierarchy.png is a useful reference, along with http://codex.wordpress.org/Child_Themes#Template_files.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.