• Hello

    Altough I have more than 300 definitions I only can see E D F glossaries only, is there any solution for this?

    Since I do have a lot of words, Is there any way to add pagination on the glossary page ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bastien Martinent

    (@bmartinent)

    There is this hook ‘mywpglossary_glossary_term_limit’, which controls the definition limit of the glossary block or shortcode.

    add_filter(? ‘mywpglossary_glossary_term_limit’, function( $limit ){ return -1; }, 10, 1 );
    -1 is unlimited
    200 is default
    Be careful with this, it can have performance issues.
    A pagination or an infinite load is the best way to do this but is not supported by the plugin right now. Sorry.

    E to F has 200 of your definitions ? This reduced index is your second issue ?

    Thread Starter Gorthi

    (@yas-se)

    Thank you for the quick reply.

    Apparently now with an increased limit it’s showing the necessary terms. BUT as there is +300 terms the page is becoming very long.

    It’s very important to create a pagination for it I believe.

    Do you plan on adding it any soon please? or do you have any hook to add it?

    I appreciate your help.

    Plugin Author Bastien Martinent

    (@bmartinent)

    Do you have a plan soon ? Unfortunately no. This plugin is a low priority for us. but i think this deserves to be prioritized before an option page or other planned feature.
    There is a hook who can override the glossary model and it is possible to load the terms from wp-rest, but this means more or less redoing the glossary page and frontend logic.

    In one word, there is no simple way to do this right now. I am sincerely sorry.

    @yas-se
    I had the same issue and worked around it by using another search input. This way a user can search within the glossary page the same way you’d be using CTRL+F; but within the html instead of a pop-up.

    @bmartinent : feel free to include it in your next update…

    <div class="searchterm">
    	<p>SEARCH:</p>
    	<input placeholder="..." type="text" id="searchterm">
    	<input id="myBtn" type="button" value="SUCHEN" onclick="search(document.getElementById('searchterm').value)">
    </div>
    
    <script>
    function search(string){
    	window.find(string);
    }
    
    // Get the input field
    var input = document.getElementById("searchterm");
    
    // Execute a function when the user presses a key on the keyboard
    input.addEventListener("keypress", function(event) {
      // If the user presses the "Enter" key on the keyboard
      if (event.key === "Enter") {
        // Cancel the default action, if needed
        event.preventDefault();
        // Trigger the button element with a click
        document.getElementById("myBtn").click();
    	//alert(document.getElementById('searchterm').value);
    	//document("\"mywpglossary-term-"+document.getElementById('searchterm'\").value).click();
      }
    });
    </script>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two issues happened’ is closed to new replies.