Max Power Max Power - 26 days ago 16
HTML Question

How to edit the html (php?) of a wordpress page

This is a hard question to phrase because I know that html is generated by the PHP files inside the themes.

I'm trying to add a line break and can do so going into classic mode while editing a page but this line break gets removed after time? So now I'm trying to go to the source and add it there (also any changes I want to make in the future).

Is this possible in

WordPress
or simply a feature we don't have? Please let me know if I'm wasting my time trying to do this.

Here is the php of my
page.php
file.

<?php
/*
* Content Page
*
* @package adios
* @since 1.0
*/
get_template_part('templates/global/page-before-content');
while ( have_posts() ) : the_post();

the_content();

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'adios' ),
'after' => '</div>',
) );

// If comments are open or we have at least one comment, load up the comment template
if ((comments_open() || get_comments_number()) ) :
comments_template();
endif;
endwhile;
get_template_part('templates/global/page-after-content');


I don't know php only html and css so this is confusing to me, I'ved tried going to page-before-content and after-content but those don't seem to be useful. Also, yes I'm using a ftp server.

Here's the php from
page-before-content.php


$layout = adios_get_opt('main-layout');
if ($layout == 'left_sidebar'): ?>
<div class="row">
<?php get_sidebar(); ?>
<div class="col-md-8">
<?php elseif ($layout == 'right_sidebar'): ?>
<div class="row">
<div class="col-md-8">
<?php else: ?>

<?php endif; ?>


and
page-after-content.php


$layout = adios_get_opt('main-layout');
if ($layout == 'left_sidebar'): ?>
</div>
</div><!-- .row -->
<?php elseif ($layout == 'right_sidebar'): ?>
</div>
<?php get_sidebar(); ?>
</div><!-- .row -->
<?php else: ?>

<?php endif; ?>

Answer

You could install TinyMCE Advanced. It has a option to keep the <p> and <br> tag.

enter image description here