• When I inspect source of a website via a browser it shows it me in HTML, but when it comes to actually editing the websites, all code is written in PHP so I can change custom buttons created.

    Is there a way to just edit the webpage as HTML instead of PHP??

    Example:

    Button in header.php:

    <?php if( get_field('options_remoteLogin', 'option') ) : ?>
    					<a href="<?php the_field('options_remoteLogin', 'option')  ?>" class="btn-login" target="_blank"><span class="glyphicon icon-Figure"></span> Get Support</a>
    				<?php endif; ?>

    In HTML:

    <a href="https://example.com" class="btn-login" target="_blank"><span class="glyphicon icon-Figure"></span> Get Support</a>
    							</div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • @foamshrimpdesigns

    WordPress is built in PHP but it creates your website in the languages browsers use, namely HTML, CSS and JavaScript.

    Can you edit the files – absolutely.
    Should you – debatable.
    Should you hard code HTML – almost certainly not.

    WordPress is design to be flexible and there is very likely to be a way to change this in the code already that will survive updates and work very effectively.

    Thread Starter foamshrimpdesigns

    (@foamshrimpdesigns)

    @mattyrob

    How would I go about editing it in HTML??

    For the time being, I know minimum PHP, but will be learning more in the future, but for now need to done some changes which i would prefer via HTML.

    @foamshrimpdesigns

    You’ll have to find the place in the PHP files where the HTML is generated that you want to change, like in you example above. Then remove the PHP parts and place your HTML between a closing PHP tag ?> and then after your HTML add an opening PHP tag again <?php to make sure you done break your site.

    The same I am trying to do with lilylisto but it is very hard to edit the php code. is it possible to create changes with html view source. I also want to change the button style it’s ver easy with browser view source but I am Unable to do changes with php wordpress editing. if you have done kindly share me how did you do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editing WP in HTML instead of PHP…’ is closed to new replies.