• Resolved Tim Codex

    (@tien-nguyen)


    Dear all,

    I just install a new Centos server with Ngnix and php-fpm.

    Now, I am develop a template with my site at: bloggeritems.com
    But a weird error is when I code like below:

    <div class="blog-info">
    				<?php $fname = 'Blogger Items'; ?>
    
    				<?php if ( is_archive() ) : ?>
    					<h1 class="site-title"><?echo $fname;?></h1>
    				<?php else : ?>
    					<h2 class="site-title"><?echo $fname?></h2>
    				<?php endif; ?>
    
    				<p class="site-description"><?php bloginfo( 'description' ); ?></p>
    			</div>

    The output result will like below:

    <div class="blog-info">
    
    									<h2 class="site-title"><!--?echo $fname?--></h2>
    
    				<p class="site-description">Blogger and Blogspot Organization created amazing templates, widget, guide, tips, discussions and all free for you.</p>
    			</div>

    Mean <?echo $fname;?> in PHP will become <!--?echo $fname?--> in HTML
    This is WP bug or I am a noob?

    Appreciate all helps.

    Best regards,
    Tien Nguyen

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Weird bug: WordPress auto convert PHP to HTML code’ is closed to new replies.