Plugin Writing Issues
-
Hi I’m a relative wordpress newbie. I’m trying to write my own plugin for purely for my own purposes. I’m trying to define a function which returns a block of html which can be called anywhere in a page…
here goes my plugin:
<?php
/*
Plugin Name: Blog Mela
Version: 1.0
Author: Saket Vaidya
Author URI: https://www.vulturo.com
Description: Bharateeya Blog Mela
*/function get_blogmela() {
echo "<ul>
<li>
<a href="https://calamur.org/gargi/2005/06/18/bharateeya-blogmela-a-round-up/">Current Blog Mela</a></li>
<li><a href="https://www.madhoo.com/archives/003267.php">Next Blog Mela</a></li>
</ul>";
}?>
But If I try to activate this plugin, It messes up my admin panel… and messes up all the pages where the “get_blogmela” function has been called.
The issue is, the same thing works If I don’t supply links in the html blocks. For example.. this works:
<?php
/*
Plugin Name: Blog Mela
Version: 1.0
Author: Saket Vaidya
Author URI: https://www.vulturo.com
Description: Bharateeya Blog Mela
*/function get_blogmela() {
echo "<ul>
<li>
Plain Text</li>
<li>More Plain Text</li>
</ul>";
}?>
Its funny, if the HTML block has hyperlinks, the plugin won’t work… it will work if it has plain text only.
Can someone suggest a remedy?
- The topic ‘Plugin Writing Issues’ is closed to new replies.