Forum Replies Created
-
AuthorPosts
-
eduardomachucaMember
By the way, before even making these changes, I've noticed that on ie10 pages had strange characters on the text, but not on Chrome. Made these changes thinking it will solve that but not.
After testing found that ie10 was automatically selecting the encoding as Occidental European (Windows), instead of Unicode UTF-8. I had to manually select UTF-8 to see the page text correctly.
Made more testing and finally found out that it was the W3TC plugin. Disabling it corrected the problem (purging all caches did not fix the problem), and ie10 was able to correctly and automatically encode the page as UTF-8. So, I now have deleted the W3TC plugin from my site.
Eduardo Machuca
eduardomachucaMemberThank you all. Just tested and worked. I was missing the php markups within the function; I was removing all markup. It finally looks like this (with my own theme's doctype):
remove_action( 'genesis_doctype', 'genesis_do_doctype' ); add_action( 'genesis_doctype', 'child_do_doctype' ); /** * Include Facebook Open Social namespaces. * * @author Gary Jones * @link http://code.garyjones.co.uk/modify-doctype/ */ function child_do_doctype() { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head profile="http://gmpg.org/xfn/11"> <?php }
And added to my htaccess file:
# add default charset utf-8 <filesMatch ".(htm|html|css|js|php)$"> AddDefaultCharset UTF-8 DefaultLanguage en-US AddType 'text/css; charset=UTF-8' .css AddType 'application/x-javascript; charset=UTF-8' .js </filesMatch>
Gracias,
Eduardo Machuca
eduardomachucaMemberNope, all I have to do is enter the code into functions file, pasting even as plain text, and the site breaks.
Eduardo Machuca
eduardomachucaMemberI copied/pasted the code from the article but it seems to have entered div markup. Trying again,
<code class="php plain">remove_action( </code><code class="php string">'genesis_doctype'</code><code class="php plain">, </code><code class="php string">'genesis_do_doctype'</code> <code class="php plain">);</code> <code class="php plain">add_action( </code><code class="php string">'genesis_doctype'</code><code class="php plain">, </code><code class="php string">'child_do_doctype'</code> <code class="php plain">);</code> <code class="php keyword">function</code> <code class="php plain">child_do_doctype() {</code> <code class="php plain"><!DOCTYPE html PUBLIC </code><code class="php string">"-//W3C//DTD XHTML 1.0 Transitional//EN"</code> <code class="php string">"</code><code class="php string">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></code><code class="php plain"> </code> <div class="line number8 index7 alt1"><code class="php plain"><html xmlns=</code><code class="php string">"</code><code class="php comments">http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"></code></div> <div class="line number9 index8 alt2"><code class="php plain"><head profile=</code><code class="php string">"</code><code class="php comments">http://gmpg.org/xfn/11"></code></div> <div class="line number9 index8 alt2">}</div> <div class="line number9 index8 alt2">
Hmmm, probably that's what happening to my site when I paste the code (it's probably pasting hidden markup?). Will check now.
Eduardo Machuca
eduardomachucaMemberThanks for the code! Yet, if I enter it into my theme's (modern portfolio) functions.php file, the site breaks with a 500 server error. All I'm doing is replacing the code with my theme doctype info, and deleting the http-equiv charset meta tag line; charset declared in the htaccess file.
I was told, long time before, to enter php code into the functions file without the php markups, as show below. But even if I enter the code as in the article, the website also breaks.
I have added other code snippets to the functions file, from studiopress, and the site has been working fine.
* removing the author's comments/link just for clarity.
<pre class="line-pre"> <div class="line" id="file-functions-php-LC3">remove_action( 'genesis_doctype', 'genesis_do_doctype' );</div> <div class="line" id="file-functions-php-LC4">add_action( 'genesis_doctype', 'child_do_doctype' );</div> <div class="line"></div> <div class="line" id="file-functions-php-LC5"><span style="font-size: 12px; line-height: 18px;">function child_do_doctype() {</span></div> <div class="line" id="file-functions-php-LC12"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head profile="http://gmpg.org/xfn/11"> </div> <div class="line" id="file-functions-php-LC18">}</div> <div class="line">
Gracias,
Eduardo Machuca
eduardomachucaMemberClarified. Thanks for your prompt answer!
Eduardo Machuca
-
AuthorPosts