• I created a widget which can be activated as a plugin. My widget, upload, and form functions look like so:

    function widget($args, $instance)
    {
        //code goes here
                                ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?
    }
    
    function update($new_instance, $old_instance)
    {
       return $new_instance;
    }
    
    function form( $instance )
    {
        ?>
        <!--html for form in admin-->
        <?php
    }

    However when viewed from the site it shows the html elements inside my form function and when inspected you can see that the PHP tags have been changed to html comment tags. like so:

    <!--?
        }
    
        function update($new_instance, $old_instance)
        {
            return $new_instance;
        }
    
        function form( $instance )
        {
            ?-->
Viewing 1 replies (of 1 total)
  • I’m not sure if this is the cause, but you should change <? on line eleven to <?php

    Edit: that probably is the cause. Try changing that and it should work ??

Viewing 1 replies (of 1 total)
  • The topic ‘Comment tags added into my plugin’ is closed to new replies.