Support » Plugin: CM Tooltip Glossary » Add a Link to Glossary Index on Item Page

  • For anyone who would like to add a link to the glossary index page after the definition, here is a simple way to do it.

    On enhanced-tooltipglossary/glossary.php, add the two lines that are followed by the “//Add this line” comment in the following code snippet:

    function red_glossary_singlePage($content) {
    	$link_to_index = get_permalink($ID); //Add this line and replace $ID with the post/page ID number of your glossary index page
        if (is_single() && get_query_var('post_type') == 'glossary') {
    	$content.='<a href="' . $link_to_index . '">Return to Glossary Index</a>'; // Add this line to insert the link at the bottom of each definition
            // By leaving following snippet in the code, you're expressing your gratitude to creators of this plugin. Thank You! //
            $content.='<div style="display:block;clear:both;"></div><span class="cmetg_poweredby"><a href="" target="_new" class="cmetg_poweredbylink">CreativeMinds WordPress Plugin</a> <a href="" target="_new" class="cmetg_poweredbylink">Enhanced Tooltip Glossary</a></span>';
        return $content;

  • The topic ‘Add a Link to Glossary Index on Item Page’ is closed to new replies.