Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Realtyna

    (@realtyna)

    Hi,

    You shouldn’t copy all files! You should only copy tmpl files without tmpl directory. For example /plugins/real-estate-listing-realtyna-wpl/views/frontend/property_listing/tmpl/default.php will be /themes/mytheme-child/wplhtml/views/frontend/property_listing/default.php

    Regards,
    Realtyna support team

    Thread Starter viothrash

    (@viothrash)

    Do you mean that copying all files will make nothing work?

    Thread Starter viothrash

    (@viothrash)

    Well, I’m trying to override in this path:

    themes/mytheme-child/wplhtml/views/frontend/property_show/default.php

    Still doing nothing..

    With this function

    function thelist() {
        $included_files = get_included_files();
        $stylesheet_dir = str_replace( '\\', '/', get_stylesheet_directory() );
        $template_dir   = str_replace( '\\', '/', get_template_directory() );
        echo '<h3 class="debugtitle">Theme file templates used in this page</h3>';
        echo'<ul>';
        foreach ( $included_files as $key => $path ) {
    
            $path   = str_replace( '\\', '/', $path );
    
            if ( false === strpos( $path, $stylesheet_dir ) && false === strpos( $path, $template_dir ) )
                unset( $included_files[$key] );
    
            if(strpos($path, '/wp-content/plugins/real-estate-listing-realtyna-wpl/views/') == true || strpos($path, '/wp-content/themes/sunbelt/wplhtml/') == true) {
                echo "<li>" . $key." = ". $path."</li>";
            }
        }
        echo '</ul>';
    }

    Still returning plugin files that been used in property show page:

    216 = /.../plugins/real-estate-listing-realtyna-wpl/views/frontend/property_show/wpl_main.php
    217 = /.../plugins/real-estate-listing-realtyna-wpl/views/frontend/property_show/wpl_abstract.php
    221 = /.../plugins/real-estate-listing-realtyna-wpl/views/frontend/property_show/tmpl/default.php
    222 = /.../plugins/real-estate-listing-realtyna-wpl/views/frontend/property_show/tmpl/scripts/js.php
    Plugin Author Realtyna

    (@realtyna)

    Hi,

    Based on this KB article, you should remove /views/ directory from /themes/mytheme-child/wplhtml/ directory. Therefor the file path will be

    /themes/mytheme-child/wplhtml/frontend/property_show/default.php

    Sorry, it seems my last reply wasn’t correct and thanks to WordPress, I cannot modify it now!

    Regards,
    Realtyna support team

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Override WPL views on a child theme’ is closed to new replies.