WordPress.org

Ready to get started?Download WordPress

Forums

WP Glossary
[resolved] Request for backlink from /glossary/single_word/ (2 posts)

  1. jchris
    Member
    Posted 1 year ago #

    It would be nice if the single word page would linc back to the glossary. For now I have to att code inte every glossary term.

    Like this

    <br/>
    <A HREF="javascript:javascript:history.go(-1)">&laquo;Back</A>


    It might fit nicely as an option inside the plugin.

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

  2. TCBarrett
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jchris

    Not sure how to do this nicely as an option/setting in the plugin.

    You can achieve it yourself either by writing your own single-glossary.php template file, or with a filter.

    add_filter( 'the_content', 'tcb_wpg_backlink' );
    function tcb_wpg_backlink( $content ){
      global $post;
      if( is_single() && $post->post_type == 'glossary' ):
        $content .= '<br><a href="javascript:javascript:history.go(-1)">¬ęBack</a>';
      endif;
      return $content;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.