Explanatory Dictionary
[resolved] Display synonyms and forms in dictionary page (2 posts)

  1. asafadis
    Posted 1 year ago #

  2. azerphoenix
    Posted 1 year ago #

    Hi) If you want to display synonyms in the dictionary page you must:

    1st - open
    - wp-contene/plugins/explanation-dictionary/views/explanation-dictionary.php

    2nd - find the code
    <span class="explanatory-dictionary-entry-word"><?php echo $entry->word; ?></span>
    <span class="explanatory-dictionary-entry-explanation"><?php echo $entry->explanation; ?></span>

    3rd - change this code to:

    <ul><li><span class="explanatory-dictionary-entry-word"><?php echo $entry->word; ?></span></br></li></ul>
    		<?php $synonyms_and_forms = maybe_unserialize( $entry->synonyms_and_forms ); ?>
    <?php if ( $synonyms_and_forms ) : ?>
    	||&nbsp Synonyms: <span class="explanatory-dictionary-entry-synonyms"><?php echo implode( ', ', $synonyms_and_forms ); ?></span></br>
    <?php else : ?>
    	<span>||&nbsp No synonyms</span>
    <?php endif; ?></br>
    			<span class="explanatory-dictionary-entry-explanation"><?php echo $entry->explanation; ?></span>

    If the word has no synonyms will displayed "No synonyms" and if the word have synonym will displayed your text.

    Example in my site: Medical Books 24

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Explanatory Dictionary
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic