• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

How to Comment Code in WordPress Templates

9 December 2007 / Alec Kinnear / Leave a Comment

I’ve spent a lot of the weekend working on a Vancouver real estate website which we converted to WordPress last year.

(Don’t feel too sorry for me, the rest of the weekend I spent with my girlfriend.)

There were a bunch of issues in the PHP code which I couldn’t solve myself so I had to leave my efforts there for the designer.

I was unable to comment it out with html comments (what I usually do). PHP comments wouldn’t work either, so I put some serious research into how to comment PHP properly.

It turns out there is a simple but very effective trick:

<?php /*
comment
*/ ?>

I recommend reading the full article on How to Comment Code in WordPress templates if commenting WordPress templates is something you need it do occasionally. It will save you a lot of time.

I am sure much of this applies to our friends over in Mambo/Joomla and Drupal land.

A tip of the hat to My Digital Life for his article – Comments and Comment Blocks in PHP.

Alec Kinnear

Alec Kinnear

Alec has been helping businesses succeed online since 2000. Alec is an SEM expert with a background in advertising, as a former Head of Television for Grey Moscow and Senior Television Producer for Bates, Saatchi and Saatchi Russia.

Categories: WordPress Tags: WordPress

Related Posts

  1. How to Comment Code in WordPress Templates

    How to Comment Code in WordPress Templates

  2. The ideal WordPress comment code

    The ideal WordPress comment code

  3. WordPress Comment Ratings Plugins Roundup: Zaki vs Ulike vs Comment Vote vs Voter vs Thumbs Rating vs GD Rating System

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Click here to Subscribe without commenting

Primary Sidebar

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • FV Player
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2026 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬