[Support request] How to add Theme Templates

Home Forums Support [Support request] How to add Theme Templates

Home Forums Support How to add Theme Templates

Viewing 15 posts - 16 through 30 (of 42 total)
  • Author
    Posts
  • #1305597
    Tom
    Lead Developer
    Lead Developer

    That specific page is still using the default page template.

    You can see it here: https://www.screencast.com/t/VTjTCFJxTA72

    Compared to the full width page: https://www.screencast.com/t/McJOsrMOqr

    #1305707
    Gerik

    Yeah, I saw that. I’ll contact the plugin developer.

    I read a theme that has to be “ready” but they offer only a CSS, which will not fix this.

    https://kb.ihomefinder.com/s/article/theme-compatibility

    thanks, I’ll keep this update for anyone who is using Optima Express

    #1306614
    Tom
    Lead Developer
    Lead Developer

    Sounds good – thanks!

    #1308087
    Gerik

    I have to close this to open other topics.

    #1315080
    Gerik

    I’m stuck. Support got back to me and asked if I can test it with the Twenty-fifteen WP theme. The navigation is on the left-hand side so full with and no sidebar is out of the question.

    I did try it with Divi Theme which is one of the recommendations. Divi has a template page called blank which has no header, footer, or sidebar. Didn’t work.

    There is another theme called HomePress. It has page templates and they work. This is their page template.

    <?php
    
    /*
     Template Name: IDX-iHomefinder
     */
    
    $page_style_idxBroker = homepress_get_option('page_style_ihomefinder');
    
    if ($page_style_idxBroker == 'full_width') {
        $content_area = 'col-lg-12 col-md-12 col-sm-12 col-xs-12';
    } else if ($page_style_idxBroker == 'right_sidebar') {
        $content_area = 'col-lg-9 col-md-12 col-sm-12 col-sm single-post__content order-0';
    } else {
        $content_area = 'col-lg-9 col-md-12 col-sm-12 col-sm single-post__content order-1';
    }
    
    ?>
    
    <?php get_header(); ?>
    <?php get_template_part('template-parts/page', 'title'); ?>
    
    <section class="container">
    
        <div class="row">
            <div class="<?php echo esc_attr($content_area); ?>">
                <?php
                    while (have_posts()) : the_post();
                        the_content();
                    endwhile;
                ?>
            </div>
    
            <?php if ($page_style_idxBroker !== 'full_width') { ?>
                <div class="col-lg-3 col-md-12 col-sm-12 sidebar-box page__sidebar">
                    <aside id="sidebar" class="sidebar-white">
                        <?php
                        if (is_active_sidebar('iHomefinder sidebar')) {
                            dynamic_sidebar('iHomefinder sidebar');
                        }
                        ?>
                    </aside>
                </div>
            <?php } ?>
    
        </div>
    
    </section>
    
    <?php get_footer(); ?>

    You can see their template is “static”

    The funny thing is the body class is still the same “page-template-default page page-id-0 page-parent logged-in admin-bar homepress_layout_homepress customize-support ng-tns-0-0”

    do you recommend anyone to look into the Optima Express Plugin? I have trust issues and I’ve been dealing with GP for a while now, I trust you guys.

    #1315082
    Gerik

    I disabled all plugins when doing the test above if you’re curious.

    #1315125
    Gerik

    https://kb.ihomefinder.com/s/article/theme-templates

    this is the recommendation. It still doesn’t change the body class but it does change the layout…

    #1315875
    Tom
    Lead Developer
    Lead Developer

    They must be doing something weird to overwrite the body class.

    You can always copy the page.php file from the parent theme and add it to your child theme. Then add the Template headers and change the filename to something like page-custom-template.php.

    Then you can add their specific code into the template like you’ve done with the templates above.

    #1317404
    Gerik

    I decided to put this on hold because I will need to create a page file with all the CSS in it to make it work.

    I started working on other things and the strangest thing happened.

    I wanted to create an element for other pages on the website.

    I created the element and for the showing part, I picked a specific page.

    When I went to the website and notice the styling I did for that specific page was done to all the generated page by that plugin.

    How do I explain to the plugin programmers who are not familiar with elements and not get an answer like, you should use another theme?

    #1318162
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not sure I understand fully. Any chance you can explain further?

    #1318308
    Gerik

    Yes,

    If I create an Element and assign it to a specific page… This one I assigned to the about page.

    it will alter the IDX pages too.

    #1318549
    Tom
    Lead Developer
    Lead Developer

    So that Element is set to be active on the “About” page.

    Are you saying it’s also active on the IDX pages? If so, that would be very peculiar, as the Display Rules should only target the entries you’ve specified.

    #1958595
    Gerik

    I’m back at this.

    Is there someone I can hire to look at this?

    This is what I’ve done so far on trial number two.

    1. GeneratePress is using the Wired Layout.
    2. Created a child theme
    3. Added a file (page.php clone) and named it fullwidth.php
    4. Created a page called “Full Width” and added the template Full-Width
    5. Created a GP Element “Full-Width for IHF” Layout, Content (nosidebars), & Full Width (no padding)
    6. Added to function.php

    add_filter( 'generate_layout_element_display', function( $display, $element_id ) {
        if ( 4081 === $element_id && is_page_template( 'fullwidth.php' ) ) {
            $display = true;
        }
    
        return $display;
    }, 10, 2 );
    #1959396
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Your process looks good if you’re targeting pages using that template.

    Just to confirm, are your IDX pages using that template and the Layout Element isn’t applying?

    Can you confirm that the IDX pages are indeed using the template? If you add some static content into the .php file, does it display on the IDX pages?

    #1960108
    Gerik

    I added the text “hello this is files fullwidth.php”

    The WordPress Page with the Template applied. It is indeed full width
    [url=https://ibb.co/x3YZJhN][img]https://i.ibb.co/x3YZJhN/Screenshot-2021-10-11-105309.jpg[/img][/url]
    The setting on where the template is applied to the IDX page.
    [url=https://ibb.co/BjGMCkN][img]https://i.ibb.co/BjGMCkN/Screenshot-2021-10-11-105404.jpg[/img][/url]
    The IDX page. It is NOT full width
    [url=https://ibb.co/CBY4pVh][img]https://i.ibb.co/CBY4pVh/Screenshot-2021-10-11-105434.jpg[/img][/url]

    Q: IDX pages using that template and the Layout Element isn’t applying?
    A: Correct, GP Element is not being applied.

Viewing 15 posts - 16 through 30 (of 42 total)
  • You must be logged in to reply to this topic.