Ready to get started?Download WordPress


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

  1. asafadis
    Posted 9 months ago #

  2. azerphoenix
    Posted 8 months 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


You must log in to post.

About this Plugin

About this Topic