Erikvona
Forum Replies Created
-
Forum: Plugins
In reply to: [Per page add to head] Repeated Code In Source CodePlease re-read my previous question and answer it correctly. The answer you provided doesn’t answer the question.
Forum: Plugins
In reply to: [Per page add to head] Repeated Code In Source CodeDid you write this code in the section for every page, or only in the section for this specific page?
Forum: Plugins
In reply to: [Per page add to head] Repeated Code In Source CodeLine 9 10 and 11 on horlogemaker.be (browser: firefox 48):
<meta name="robots" content="noodp"/> <link rel="canonical" href="https://www.horlogemaker.be/" /> <meta property="og:locale" content="nl_BE" />
Line 87, 88, 89:
@media all and (min-width:850px) and (max-width:900px){ .adlinks { padding-left: 40px !important;
Also, line 9, 10 and 11 are inserted by the Yoast SEO plugin.
Please check your errors, and provide a specific instruction on how to replicate them.
Forum: Plugins
In reply to: [Per page add to head] Is "evonapluginconfig" folder from this plugin?Yes.
To be honest, the separate plugin config folder could’ve been avoided. I made it because it allows for managing of the config files (if the plugin gets deleted, you can choose to keep or delete the config files, for now it always deletes them. If I put them in my plugin folder, WordPress doesn’t allow for preserving config files when a plugin gets deleted).
In the future I might make an update to move all the config options to the database. For now I haven’t done this yet because on my web server there is a minimal increase in page load time if I do.
As far as I know, storing my config files in a separate folder doesn’t really have a disadvantage over storing them in the same folder, except that the plugin has to remove the files and folder upon deletion, which mine does, and there are no security risks in it. I don’t really see why your security plugin marks this as an issue. Obviously, if I was allowing for PHP code to be written in my config files, it might be a different case, and maybe the security plugin can’t differentiate.
Well, it sure sounds like a bug, but with the information you’re giving me unfortunately I have no way of replicating it, so I can’t determine what is going wrong.
Are you only trying to modify it directly, or have you also tried modifying it through the text box? Do you get any error messages? Does this also occur when adding new content, or only when modifying it?
Have you tried hiding the text box in the screen options? Does that resolve your problem?
This plugin uses WordPress’s nonce functionality to make sure the information is correctly updated, and not overwritten with old information. Possibly something is going wrong here.
and just for clarification: you are trying to add content to the head tag, not the http header nor the html header tag?
Forum: Plugins
In reply to: [Per page add to head] Woocommerce /checkout/ editing?This is not supported. You can only add to pages and posts, or to every page and post.
If you want to use this plugin for specific WooCommerce functions, you need to put them on a page.
Forum: Everything else WordPress
In reply to: Teaching WordPress – should I do a local install?I have actually had the same problem. Was teaching WordPress also, and tried 000freewebhost (before the hack). The problem was that the school I was teaching at actually blocked my students’s sites (they had a strict firewall, I told them to exclude 000freewebhost, but the free domains were still blocked. Lost one lesson to this
My advice is: Use XAMPP. You can use the portable version, tell your students to install it on an USB stick if you’re using public computers, and you can provide them with your copy if they missed a lesson. Note that if you’re going to use USB sticks, installing XAMPP takes some time, and running it on really cheap USB sticks can cause a problem.
You can combine XAMPP and a bitnami plugin if you don’t use an USB install, or you can preinstall WordPress, then zip it and distribute it to your students if you do, for ease of installation.
Forum: Plugins
In reply to: [Per page add to head] doesn't works on wp 4.2.2Closed because lack of information
Forum: Plugins
In reply to: [Per page add to head] Adding %BREAK% for new lines?Fixed in 1.3
Error was caused by WordPress’s built-in esc_sql function as far as I could seeForum: Plugins
In reply to: [Per page add to head] Does not work on Nginx serverFixed in 1.3 release
Forum: Plugins
In reply to: [Per page add to head] Multi site supportNo, multi site support will require me to rewrite the code that stores the head for every page.
The per page function does support multi-site as far as I know, though.
Multi-site support is not something I intend to add anytime soon. I just don’t have the time for it, nor do I have much experience with WP multi site.
You can change the order of appearance by editing the plugin, as discussed earlier in this support forum post.
In your case, you will have to use a low integer, like 1 or 0.
So just edit the perpagehead.php, line 114:
add_action('wp_head', 'perpageath_display', 1000);
becomes
add_action('wp_head', 'perpageath_display', 1);
This will place the add to head content at the top of the wp_head queue. However, some themes add content to the head tag outside of the wp_head action. If this is the case with your theme, there is no way to get the content to show up first, besides editing your theme.
Of course, any changes you make to the plugin will reset after a plugin update, so keep that in mind.
If more people want to customize this setting, please reply to the support forum. I can easily make an option for this (but I want to keep the option count as low as possible for load times/keeping the plugin simple).
Forum: Plugins
In reply to: [Per page add to head] Does not work on Nginx serverThis can occur if the $_SERVER superglobal is malfunctioning in PHP, or if the WordPress nonce are not properly functioning. Both are not a plugin issue but a server issue.
If it’s in the settings page, it’s probably the $_SERVER superglobal, if it’s at individual pages it’s probably the nonce.
This plugin does not use any Apache specific code, so it should work fine on Nginx as long as all the superglobals and cookies are correctly configured, and WordPress is correctly set up.
Forum: Plugins
In reply to: [Per page add to head] 403 error when saving the pageHm… If you can add other code, and it has nothing to do with other plugins, then I am at a loss also. The only parsing it does is to prevent MySQL injection, but that is done with built-in WordPress functions.
It’s still possible your webhosting provider prevents POST requests containing data suspect for MySQL injection and is blocking your request. That could also explain the 403 instead of a WordPress error. Because if something goes wrong with processing the data entered in the plugin, it will throw a WordPress or wp_die error, and not a 403.
You can still try to add it manually. That way my plugin does none of the parsing. If that doesn’t work, it’s surely a WordPress or web hosting problem.
Forum: Plugins
In reply to: [Per page add to head] 403 error when saving the pageNope, the code seems solid. Also, I can’t replicate the error.
Can you add other content to the head, but just not this? If that is the case, you could have a security plugin that blocks you from inserting <script> tags. Some security plugins detect these tags and return a 403. Even your web hosting provider could block this.If you can’t insert code to the head at all (non-script code) either the plugin or WordPress is configured incorrectly.
As a workaround, you can also manually add the content you want to add to the head section, by going to screen options and checking Custom Fields, and then using the custom field box to add a field with the name per-page-ath-content. Anything put in that field will be added in the head section. However, some errors may occur in the preserving of whitespace, and the escaping of quotes. If you can’t manually add the code, there is an issue with a security plugin.