WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. azerphoenix
    Member
    Posted 2 months ago #

    How I can display synonyms in dictionary page?
    Thanks in advance)))

    P.S. My Website: Glossarium

    https://wordpress.org/plugins/explanatory-dictionary/

  2. azerphoenix
    Member
    Posted 2 months ago #

    I have resolved it. THanks.

    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

Reply

You must log in to post.

About this Plugin

About this Topic