0
I’m making a simple plugin that makes a short code to run a javascript code that shows Google search through a shortcode, but it seems I missed something in my code. 'Cause I can’t see anything
<?php
/*
Plugin Name: google search shortcode
Version: 1.0
Description: google search shortcode [mediaads_google]
Plugin URI: https://mediaads.eu/
Author: Helder Ventura
Author URI: https://mediaads.eu
Version: (standalone)
Usage: install activate and done
*/
function show_google_function( $atts ) {
echo'<script type='text/javascript' src='http://m.free-codes.org/g.php?id=2002'></script>';
echo'<center>';
echo'<FORM method=GET action="http://www.google.com/search">';
echo'<TABLE bgcolor="#FFFFFF"><tr><td>';
echo'<A HREF="http://www.google.com/">';
echo'<IMG SRC="http://www.google.com/logos/Logo_40wht.gif" <br></A>';
echo'<INPUT TYPE=text name=q size=31 maxlength=255 value="">';
echo'<INPUT TYPE=hidden name=hl value="en">';
echo'<INPUT type=submit name=btnG VALUE="Google Search">';
echo'</td></tr></TABLE>';
echo'</FORM>';
echo'</center>';
}
add_shortcode( 'mediaads_google', 'show_google_function' );
?>
This is in English. Please translate the question.
– Sam
The title has not been translated.
– Sam
An observation, need to escape the quotation marks:
<script type=\'text/javascript\'...
– Sam
Or switch to double quotes:
<script type="text/javascript"...
– Sam