Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit:</strong> I just did a test and it looks like this answer is wrong. I was able to mix colon and brace if and while syntax together. However, the manual does state:</p> <blockquote> <p>'Note: Mixing syntaxes in the same control block is not supported.'</p> </blockquote> <p>So I'm a bit confused about this.</p> <hr> <p>PHP If statements have two types of syntax, one with braces, and one with colons.</p> <pre><code>if () { } </code></pre> <p>and </p> <pre><code>if (): endif; </code></pre> <p>There are also similar syntaxes for while, for, foreach etc. But you aren't allowed to mix the braces with the colon syntaxes. So you need to either change your code to</p> <pre><code> if($layout=="one") { if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1') ) { } } elseif($layout=="two") { if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(' Sidebar 1') ) { } if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 2') ) { } } elseif($layout=="three") { (...) </code></pre> <p>or</p> <pre><code> if($layout=="one"): if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1') ) : endif; elseif($layout=="two"): if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(' Sidebar 1') ) : endif; if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 2') ) : endif; elseif($layout=="three"): (...) endif; </code></pre> <p>You can read more about it at <a href="http://php.net/manual/en/control-structures.alternative-syntax.php" rel="nofollow">http://php.net/manual/en/control-structures.alternative-syntax.php</a></p> <p>Edit: How silly of me I didn't notice this. Like the other answers say, you have used a single equals sign instead of two to test for equality.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload