wissam6
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: slide windowexactly what i want but i am facing a problem with this script, hope you can help me:
note that i didn’t change anything from the example.
i am seeing the div on the left, but when i click on the link he is not firing the “trigger”. i checked up the script he is firing the js but he is not firing the $(‘#trigger’).on(‘click’,function(e){
e.preventDefault();
$(‘#slider’).css(‘left’, ‘100px’);
});Forum: Fixing WordPress
In reply to: slide windowthank you, i will check it
Forum: Plugins
In reply to: [Relevanssi - A Better Search] auto suggestionthank you for your prompt reply.
i want to keep revelanssi even without autocomplete, (i like it) but i need to resolve my issue.till now, with your help, i succeed to highlight in arabic language all the word i am searching for even without the accents.
BUT What i need, and this is my issue, is in the search result page:
my pages are big in term of content (texts), even if the words are highlighted after the search, i need something like “next iteration found”. is it possible?Forum: Plugins
In reply to: [Relevanssi - A Better Search] search result in a sectionoh yes it works!
the answer is that we have to use the decodeURIComponent if we have arabic text in the url:replace the line
window.location.href.replace( location.hash, ” ).replace(
by
decodeURIComponent(window.location.href).replace( location.hash, ” ).replace(hope it will be useful for the others
thxForum: Plugins
In reply to: [Relevanssi - A Better Search] search result in a sectionafter i integrated the javascript code in the header of every page i see that it doesn’t work, i mean from my result page if i open the page it doesn’t scroll down automatically.
do you think because of incompatibility of javascript and arabic text?
i think so, because the function in the javascript which read the url return text like https://arabiccatholicbible.com/project/luke/?highlight=%D8%AF%D8%A7%D9%88%D8%AF instead of the real word in arabic.is there a workaround?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] search result in a sectionfirst i tried to put the js code on the page, i have this error :
Uncaught ReferenceError: getParams is not definedForum: Plugins
In reply to: [Relevanssi - A Better Search] search result in a sectionthx
If I understood correctly, tou are saying that either we use javascript code or the function wp_enqueue_script(), right?the JavaScript code should be on my page? on each page?
and wp_enqueue_script()? where i should write it?thank you in advance
Forum: Plugins
In reply to: [Relevanssi - A Better Search] search: remove diacriticsthanks a lot, it works
Forum: Plugins
In reply to: [Relevanssi - A Better Search] search: remove diacriticsi put this code in function.php
for the the time beeing i didn’t replace anything, i use what you suggest, the problem is in line which beging with “from_re” , because i tried to build the array line by line and i noticed that on this line there’s the problem.the error is: Your PHP code changes were rolled back due to an error on line 0 of file Unknown. Please fix and try saving again.
Exception thrown without a stack frame
thank you for your help.
$array = array(
‘from’ => array( ‘a’, ‘c’, ‘e’, ‘i’, ‘o’, ‘u’, ‘n’ ),
‘to’ => array( ‘(?:a|á|à|a)’, ‘(?:c|?)’, ‘(?:e|é|è|ê|?)’, ‘(?:i|í|ì|?|?)’, ‘(?:o|ó|ò|?|?)’, ‘(?:u|ú|ù|ü|?)’, ‘(?:n|?)’ ),
‘from_re’ => array( “/(s)(‘|’)?$/”, “/^(|:/” ),
‘to_re’ => array( “(?:(?:’|’)?\1|\1(?:’|’)?)”, “?(‘|’)?” ),
);add_filter( ‘relevanssi_accents_replacement_arrays’, function ( $replacements ) {
$replacements[‘to’][0] = ‘(?:a|á|à|a|?)’;
return $replacements;
});`Forum: Plugins
In reply to: [Relevanssi - A Better Search] search: remove diacriticscan i make what you are suggesting in function.php ?
because i have an error when i try to declare the array ??Forum: Plugins
In reply to: [Relevanssi - A Better Search] search: remove diacriticswhat ae you saying is to remove the letters a c e …etc. and put the arabic alphabet, no?
array( 'from' => array( 'a', 'c', 'e', 'i', 'o', 'u', 'n' ), 'to' => array( '(?:a|á|à|a)', '(?:c|?)', '(?:e|é|è|ê|?)', '(?:i|í|ì|?|?)', '(?:o|ó|ò|?|?)', '(?:u|ú|ù|ü|?)', '(?:n|?)' ), 'from_re' => array( "/(s)('|’)?$/", "/<a href="'|’">^(|:</a>/" ), 'to_re' => array( "(?:(?:'|’)?\1|\1(?:'|’)?)", "?('|’)?" ), )
Forum: Plugins
In reply to: [Relevanssi - A Better Search] search: remove diacriticscan i make what you are suggesting in function.php ?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] excluding sectionTHANKS A LOT
Forum: Plugins
In reply to: [Relevanssi - A Better Search] excluding sectionhi, thanks for your reply, so the post is saying:
To remove all parts of the post marked with the relevanssi_noindex class from the excerpts, you can use this:
add_filter( ‘relevanssi_excerpt_content’, ‘rlv_remove_noindex_class’ );
function rlv_remove_noindex_class( $content ) {
return preg_replace( ‘#<(.*) class=”.*?relevanssi_noindex”.*?</\1>#ms’, ”, $content );
}but how can i mark a part of my post with this class? (i am using divi and in the beginning of my post i have a section which i don’t want to appear in the excerpt)
thx
Forum: Plugins
In reply to: [Relevanssi - A Better Search] excluding sectionsorry i think i was not clear:
actually when i do search, in the result page it show also the 2-3 first line of my page (i think it is in defined setting “Length of the snippet”). what i need is to not show these lines, i want to skip it, is it possible?