Override WordPress Parent theme blog.php located in sub folder

I am working on a child theme. The parent theme has a onepage template. After installing polylang, I would like to override the parent theme blog-section.php because I need to show the “Read more” in other languages e.g. Spanish instead of always show it in English.

The blog PHP in parent theme is like this:

Read More
layouts->blog-section.php;
blank-section.php;
etc.

I tried to make a new folder called layouts and paste my own blog-section.php inside the child theme folder. I changed some codes in the child theme blog-section.php. I tried several times but nothing changed.

I read from google, about those hooks, etc function but I don’t know how to use it in this case. I override the css, and add other functions to my functions file. Those works.

Could anybody give me any advice on how to do this kind of task when the template is under sub-folder of parent theme? The parent theme name is accesspress-parallax. The child name is accesspress-parallax-child. Thanks for your advice in advance!

The parent theme Home page:

<?php
/**
 * Template Name: Home Page
 *
 * @package accesspress_parallax
 */

get_header();

$sections = of_get_option('parallax_section');

if(!empty($sections)):
foreach ($sections as $section) :
    $page = get_post( $section['page'] ); 
    $overlay = $section['overlay'];
    $image = $section['image'];
    $layout = $section['layout'];
    $category = $section['category']; 
    $googlemapclass = $layout == "googlemap_template" ? " google-map" : "";
?>

<?php if(!empty($section['page'])): ?>
    <section class="parallax-section clearfix<?php echo $googlemapclass." ".$layout;  ?>" id="<?php echo "section-".$page->ID; ?>">
    <?php if(!empty($image) && $overlay!="overlay0") : ?>
        <div class="overlay"></div>
    <?php endif; ?>

    <?php if($layout != "googlemap_template") :?>
        <div class="mid-content">
    <?php endif; ?>
        <?php  
            $query = new WP_Query( 'page_id='.$section['page'] );
            while ( $query->have_posts() ) : $query->the_post();
        ?>
            <?php 
            if($layout != "action_template" && $layout != "blank_template" && $layout != "googlemap_template"): ?>
                <h1><span><?php the_title(); ?></span></h1>

                <div class="parallax-content">
                <?php if(get_the_content() != "") : ?>
                    <div class="page-content">
                    <?php the_content(); ?>
                    </div>
                <?php endif; ?>
                </div> 
            <?php endif; ?>
        <?php 
            endwhile;    
        ?>

                <?php 
                    switch ($layout) {
                        case 'default_template':
                            $template = "layouts/default";
                            break;

                        case 'service_template':
                            $template = "layouts/service";
                            break;

                        case 'team_template':
                            $template = "layouts/team";
                            break;

                        case 'portfolio_template':
                            $template = "layouts/portfolio";
                            break;

                        case 'testimonial_template':
                            $template = "layouts/testimonial";
                            break;

                        case 'action_template':
                            $template = "layouts/action";
                            break;

                        case 'blank_template':
                            $template = "layouts/blank";
                            break;

                        case 'googlemap_template':
                            $template = "layouts/googlemap";
                            break;

                        case 'blog_template':
                            $template = "layouts/childblog";
                            break;

                        default:
                            $template = "layouts/default";
                            break;
                    }
                ?>

                <?php include($template."-section.php");?>

        <?php if($layout != "googlemap_template") :?>
        </div>
        <?php endif; ?>
    </section>
<?php
endif; 
endforeach;
endif;
?>

<?php get_footer(); ?>

And the parent theme blog-section.php page:
layouts->blog-section.php:

<?php
/**
 * The template for displaying all Parallax Templates.
 *
 * @package accesspress_parallax
 */
?>

<div class="blog-listing clearfix">
<?php 
    $args = array(
        'cat' => $category,
        'posts_per_page' => 3
        );
    $count_service = 0;
    $query = new WP_Query($args);
    if($query->have_posts()):
        $i = 0;
        while($query->have_posts()): $query->the_post();
            $i = $i + 0.25;
    ?>

    <a href="<?php the_permalink(); ?>" class="blog-list wow fadeInDown" data-wow-delay="<?php echo $i; ?>s">
        <div class="blog-image">
        <?php if(has_post_thumbnail()) : 
        $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'blog-thumbnail'); ?>
            <img src="<?php echo esc_url($image[0]); ?>" alt="<?php the_title(); ?>">
        <?php else: ?>
            <img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg" alt="<?php the_title(); ?>">
        <?php endif; ?>
        </div>
        <div class="blog-excerpt">
        <h3><?php the_title(); ?></h3>
        <h4 class="posted-date"><i class="fa fa-calendar"></i><?php echo get_the_date(); ?></h4>
            <?php echo accesspress_letter_count( get_the_excerpt(), 200 ); ?> <br />
        <span><?php _e('**Read more**','accesspress-parallax') ?>&nbsp;&nbsp;<i class="fa fa-angle-right"></i></span>
        </div>
    </a>

    <?php
        endwhile;
        wp_reset_postdata();
    endif;
?>
</div>
<div class="clearfix btn-wrap">
    <a class="btn" href="<?php echo get_category_link($category)?>"><?php _e('Read more','accesspress-parallax'); ?></a>
</div>

Related posts