• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

PHP7 – Short Tags – StreamLine Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › PHP7 – Short Tags – StreamLine Pro

This topic is: not resolved

Tagged: php7, short tags, streamline pro

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 5 months ago by euromill.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 3, 2016 at 1:44 am #182776
    euromill
    Participant

    Hi

    I am looking to update my sites to PHP7 and was advised by my hosting company that i needed to enable short tags on the site as the developer had disabled this. I dont see this in theme settings and have unsuccesfully Googled it.

    This is the extract from my email exchange

    By application I mean the website which is hosted under the following path on your system:

    /var/www/vhosts/vegascasinoguide.net/httpdocs

    Also, as you can see the errors are referring to an undefined variable within the code of the website.

    However, looking into this further we have noticed that the developer has used short tags within the code of the application which is a feature disabled by default in PHP 7.

    We have enabled the short tags for the website and now the redirects seem to be working fine.

    Any advice re this would be appreciated

    April 3, 2016 at 6:14 am #182779
    Victor Font
    Moderator

    Your hosting company said that short tags are disabled in PHP7 by default. This is not theme related and is a different kind of short tag than what you may be thinking about.

    Normally, when you think about short tags in WordPress, you think about the kind of short tags that developers create that are executed at run time. These short tags are very short snippets that are wrapped in square brackets or are executed with the do_shortcode function. (i.e. [short_code].

    PHP short tags are different and refer to inline PHP code. When PHP short tags are enabled, you would execute inline PHP code like this:

    <input name="someVar" value="<? echo $someVar; ?>">

    When PHP short tags are disabled, the above code will produce an error. To fix the error, you either have to enable short tags in php.ini or the code has to be written:

    <input name="someVar" value="<?php echo $someVar; ?>">


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    April 3, 2016 at 8:35 am #182782
    euromill
    Participant

    Thanks Victor

    that was the most comprehensive answer i got. I spoke to my host and it was as easy as changing an option to allow short code in php 7

    It is not enabled by default with my host

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble