Arabic Characters in URL returns 404 Error

I had same issue as you. I was trying to access the following URL, which results in a 404 error: The requested URL `/abb/public/main/category/كمال` was not found on this server. http://localhost/abb/public/main/category/كمال or http://localhost/abb/public/main/category/%D9%83%D9%85%D8%A7%D9%84 while accessing http://localhost/abb/public/main/category/فتنس http://localhost/abb/public/main/category/%D9%81%D8%AA%D9%86%D8%B3 or http://localhost/abb/public/main/category/ABCDEF works fine. I found the cause of issue in .htaccess file. It was: RewriteRule ^(.)$ abb/index.php?/$1 … Read more

Divide Post content into separate divs for every 500 characters (or any other character counts)

get_the_content() return what’s in the editor, but wpautop filters and such are attached to the_content (which you don’t need inside your split function – just apply it later manually with apply_filters( ‘the_content’, $output ); at the end. You should as well use strip_shortcodes( get_the_content() ); before splitting it up: $output = get_the_content(); $output = wp_trim_words( … Read more

How can I stop wp_update_post messing up HTML example code?

It was https://wordpress.org/plugins/syntaxhighlighter/ plugin’s fault. There are some functions in it that have something to do with this, namely encode_shortcode_contents_slashed_noquickedit, encode_shortcode_contents_callback. Now I replaced it to https://wordpress.org/plugins/crayon-syntax-highlighter/ but by the time I confirmed it was the other plugin’s fault I had already written a solution. function wpse190396_insert_post_data($data, $postarr){ if($postarr[‘filter’] == ‘db’ && ($data[‘post_type’] == ‘fix’ … Read more

strange characters in wordpress website displayed for visitors [closed]

Let’s start with the output we got before the fix: What happened here? My guess: a collision between the plugin W3 Total Cache and your web server LiteSpeed. I found a thread in a Drupal forum about a very similar (or the same) issue. LiteSpeed seems not to send the appropriate HTTP headers for the … Read more

Special characters in WordPress UTF-8 [closed]

Edit: Do you have <meta charset=”utf-8″ /> in your <head> tag? A user here fixed a similar problem with character encoding by adding this. There are actually many Google results that come up searching for utf-8 character encoding in wordpress. Also, does pasting the text into the HTML view of the editor and saving it … Read more

(un)wptexturize() — is it possible?

Don’t think so after skimming through the wptexturize() code, but what about using the run_wptexturize filter (untested): // Turn off wptexturize add_filter( ‘run_wptexturize’, ‘__return_false’ ); // Your text handling here … $text = apply_filters( ‘the_content’, $text ); // Remove filter remove_filter( ‘run_wptexturize’, ‘__return_false’ ); i.e. just turn off the wptexturize only for your text handling?

How to Add Customizer Setting in Child Theme

OK, check out the theme developer handbook. $wp_customize->add_control( ‘reblog_number_control’, array( ‘label’ => __( ‘Number of Reblogs’, ‘tesseract-child’ ), ‘section’ => ‘tesseract_footer_options’, ‘settings’ => ‘number_of_reblogs’, ‘type’ => ‘text’, ‘priority’ => 10 ) ); Since you are in the child theme ‘title’ => __( ‘Reblog Options’, ‘tesseract’ ), shoudl be ‘title’ => __( ‘Reblog Options’, ‘tesseract-child’ ), … Read more