WordPress.org

Support

Support » Plugins and Hacks » Best Practice for HTML code to show plugin

Best Practice for HTML code to show plugin

  • binnyva

    @binnyva

    Hi all,

    I recently wrote a plugin that lets you add a quiz to your site(http://wordpress.org/extend/plugins/eventr/)

    To show the quiz in the client side, the user should and a HTML comment to any blog post – in my case <!– QUIZZIN 1 –> (1 is ID of quiz)

    In the plugin, I use the ‘the_content’ filter to search for this code insert the plugin into its place.

    The problem is that if a user is viewing the home page of the blog, each and every post goes thru my searching function. It works perfectly – but I still has some reservations about using this method. It don’t seem like the more optimized method for doing this.

    Am I doing anything wrong? What is the best practice to follow in such a case?

    The searching function can be found at http://svn.wp-plugins.org/eventr/tags/1.00.1/eventr.php (look for eventr_scan_content() ).

    Thanks.

Viewing 1 replies (of 1 total)
  • after i install it how do i get it to show up on a page i created just for it? i am very new to wp and all of this

    thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Best Practice for HTML code to show plugin’ is closed to new replies.
Skip to toolbar