WillBontrager
Forum Replies Created
-
hardylane, the previous version is available if you need to restore. It can be picked up from the original author’s site at
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin.php
or from this WordPress site by going to
https://www.ads-software.com/plugins/insert-php/
and clicking on the Advanced View link. You’ll be taken to the
https://www.ads-software.com/plugins/insert-php/advanced/
page. Scroll down to the Previous Versions section.Will
Forum: Plugins
In reply to: [Woody code snippets - Insert Header Footer Code, AdSense Ads] CSS ProblemRoger, what you’re seeing is the WordPress function that inserts paragraph and break tags into content you type into the edit box. Insert PHP inserts your content into the post or page. Then, WordPress does what it does with the content.
You may need to figure out a way to get the CSS in there some other way, or make them all one line.
Will
Jeremy, I appreciate very much the time you invested in this. Thank you for the information.
Will
Hi Jeremy,
Thank you for your information.
I’m willing to see if I can get the same functionality using the shortcode API. It will be a fun little project.
However, and this is a serious consideration because many people rely on Insert PHP, if it’s included in an Insert PHP update it must be backward compatible.
A thought: Are you willing to take control of Insert PHP and its support with the stipulation that it remains available and that updates are backward compatible? My time is so very tight anymore.
Will
Thank you for reporting this. And I appreciate the messenger position you are experiencing.
Actually, Insert PHP doesn’t need fixing. It works just fine, has done so for years. There are a few plugin authors who have create incompatibilities with Insert PHP for their users. However, it would be a never-ending rabbit hole and rather insane time sink to modify Insert PHP whenever someone else’s software introduces an incompatibility.
A work-around to try: PHP code in an external file and using Insert PHP to include() the file.
Hi,
If the code you’re using between the insert_php tags used to work but doesn’t work now, then something changed. If the code between the tags wasn’t changed, then something else changed. Perhaps a new plugin was activated that interferes with it; but that’s just a wild guess because I don’t have access to your system.On the other hand, if this is new code you’re putting between insert_php tags, then it may be the global variable isn’t as global as it might be assumed. The
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#functionscope
section on the instruction page and the section immediately below that may provide information you can use.Try echoing the value or type for $wpdb, then check your error logs. They may provide a clue.
Will
- This reply was modified 6 years, 7 months ago by WillBontrager.
- This reply was modified 6 years, 7 months ago by WillBontrager.
Forum: Plugins
In reply to: [Woody code snippets - Insert Header Footer Code, AdSense Ads] Don’t workHello Neto,
The code works at my test site
https://bontragercgi.com/wp422/testing-simplexml_load_file/
so there is likely to be a related issue rather than Insert PHP itself.It won’t work in widgets. But I see you also have it on a post or page at
https://simuladorinvestimento.com.br/taxas-de-juros/Verify that the code is pasted into the post or page with the edit box highlighted tab being Text, not Visual.
If still no joy, there may be a plugin conflict. Other plugins may be deactivated temporarily for a test. If your Insert PHP now works, then it’s likely to be a conflict with one of the plugins or a combination of plugins.
A thought: Just to verify that the PHP SimpleXMLElement is available on your system, make a page with your PHP code, but use
<php
and?>
instead of[insert_php]
and[/insert_php]
. Load the page and see if you get the percentages you’re expecting.[Edit: Forgot to mention. Your server error log might contain clues to why the PHP code isn’t working.]
Will
- This reply was modified 6 years, 7 months ago by WillBontrager.
- This reply was modified 6 years, 7 months ago by WillBontrager.
See
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php
linked in in my first reply of this thread.Will
Try putting the PHP code into an external file. Then, with Insert PHP:
include("location-of-external-file");
Will
WordPress is inserting
<br />
tags and<p>
tags into your PHP code.That generally happens when the PHP code between the insert_php tags is entered at the post or page edit box with the Visual tab. It needs to be entered with the Text tab.
I see it is not happening on the regular post or pages, so probably that isn’t the problem. I just mention it for something to check.
Insert PHP is for posts and pages. I don’t know why it isn’t working on Tag pages. I suspect WordPress handles those differently than it does individual posts or pages.
I wish I could help you. I’m sorry I can’t. But I don’t know enough about WordPress to suggest a work-around. If you find a work-around, please post it here to share it with others.
Will
Sorry, but it’s kinda hard to suggest how to fix something when there is insufficient information.
Have a look at the
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php
page and see if any of those points might apply.Of course, the plugin must be activated, so verify that.
If still no joy, paste the complete code that you are using, including the insert_php tags, into a reply at this forum. Also, let me know if it is only the codes between [insert_php] that is showing or is the [insert_php] itself also showing?
Will
Yes, Insert PHP and Woo Commerce seem to be incompatible in certain situations. There have been a number of threads about that in this plugin’s forum.
Will
- This reply was modified 6 years, 8 months ago by WillBontrager.
Darren, I apologize my delayed reply.
Try this to see what value esc_url(get_permalink(pdf)) provides.
<pre> [insert_php] echo get_permalink(pdf); [/insert_php] <hr> [insert_php] echo esc_url(get_permalink(pdf)); [/insert_php] </pre>
Note that the pdf value may need to be in quotes, as get_permalink(“pdf”) and esc_url(get_permalink(“pdf”))
If you get values, you can see what is being inserted into your JavaScript.
If you get no values, which is possible because both get_permalink() and esc_url() may be outside the scope of Insert PHP, then check your error logs. There may be a typo in the code or it may be a scope issue. Typos can be fixed. But a scope issue is rather permanent.
Will
- This reply was modified 6 years, 8 months ago by WillBontrager.
Christian, that is really cool and a great idea.
Yes, I think I will incorporate something like that in the next version.
Would you like credit for the idea? If yes, how do you prefer to be named?
Will
Sambayour, you didn’t tell me what happens when you try the second version. But if you’re getting the angle brackets printed on the page, then try using the “Text” tab instead of the “Visual” tab when you update the post or page.
Also, some people have experienced issues when both the Visual Composer and Insert PHP plugins were installed. Seems Visual Composer does unexpected things with the code between the insert_php tags. Perhaps that is a clue to what happens when you try the second version.
Will
- This reply was modified 6 years, 9 months ago by WillBontrager.