• Resolved whatapain

    (@whatapain)


    Hi,
    I happen to read another post and the reply was to add code to my child
    functions.php file.
    Since I had followed the instructions given on your site as to how to create that when I downloaded the demo site, it was easy to find it.
    The only issue is this:
    The instructions were to add code after the ?> well THERE ISN’T one.
    So I figured I’d go to the main theme functions.php and see where it is located there and I can just insert it in my child theme, and the main theme’s functions.php is missing its closing ?> as well.
    Now I was curious and I started checking other php files and after going through about 10 functions.php and the child functions.php both are missing ?>

    Huhh? where should I put them? and am I the only one that has noticed this or is it even RELEVANT? to the price of potatoes

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    Technically, closing php tags are only necessary when you have mixed elements – like when php that is used within an html document. If the page is pure php, then you don’t need the closing tags, and it can actually prove problematic if you do include them.

    More info on this can be found in this article here:
    https://lucdebrouwer.nl/why-i-dont-use-closing-php-tags/

    Thread Starter whatapain

    (@whatapain)

    Thanks dbking. Interesting indeed. I’ll just slap the code at the end of the page and keep my fingers crossed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php closing ?> is missing’ is closed to new replies.