Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aikibe


    Dont nest <?php ?> blocks, and do not open one before terminating other so no <?php
    <?php ?> ?> Dont reopen them just use the one you started with gotcha!
    You can use this as much as you like, but it has to end with ?> not nested.
    Than do I see <?php ?> blocks like a initialization or a translation? because they are only for initialization as php language?
    Is this ok?
    <?php if ( something ); ?>
    <?php else : (something second); ?> Per if statement.

    <div> </div> I can leave out of the php blocks?
    The page is now coming out without template.

    Ok like c++ ” ; ” ends a line.
    and use ” : ” for a follow up,

    ah } is like endif; that is better yes
    I get what you mean, sometimes without the : it still is ok, like a single if statement.

    I can try it like this:

     * The template for displaying all pages
     * This is the template that displays all pages by default.
     * @link
    	<div id="primary" class="content-area">
    	<main id="main" class="site-main post-wrap" role="main"> 
    	<?php // If comments are open or we have at least one comment, load up the comment template. ?>		
    			if ( have_posts() ) :  
                                    while ( have_posts() ) : 
    				    get_template_part( 'content', 'page' );
    				    if ( comments_open() || get_comments_number() ) :
    			else :
    				get_template_part( 'content', 'none' );
    		<?php consultent_edit_link(); ?>
    		<?php     get_footer(); ?>
    		</main> <!-- /main -->
    <!-- /.post-wrap -->
    Thread Starter aikibe


    Hello Andres, I thank you. This cleared the quad problems but still the page error comes up. There is no clarity why it is doing this, the code seems correct.

    If you know php, does it make sense to put a if and else statement with ending a endif? you would expect it to endif after the if.

    also after the <?php else : ?> is it normal to place a function with < ?php infront of it and not without?
    I am not familiar with php so please explain m8.

Viewing 2 replies - 1 through 2 (of 2 total)