Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1104021
    ericshew
    Participant

    Hi there,

    I’ve seen this issue addressed a couple of times and I’ve invested several hours trying to figure it out and have not met with results. Basically, my goal is to have a copy of ane existing template that is selectable via a dropdown. Then I will write custom css that revises the page output accordingly.

    What I’ve been doing is taking files from the views/integrity theme (example: template-layout-full-width.php) and then copying them into the child theme with a new name.

    Can you let me know what I”m doing wrong or point me to a step by step process for it. Thanks!

    #1104596
    Rupok
    Member

    Hi there,

    Thanks for writing in! You can copy a page template but make sure to give it a unique name at the top :

    <?php
    
    // =============================================================================
    // TEMPLATE NAME: My Template
    // -----------------------------------------------------------------------------
    // A custom page template
    // =============================================================================
    
    ?>

    Hope this makes sense.

    #1105537
    ericshew
    Participant

    Thank you. It’s still not working. Could you help me out?

    What I’ve done is I’ve taken the
    template-layout-content-sidebar.php file and added to the x-child/framework/views/integrity directory. I did not change the name. Then I added the header above to the file so that the resulting file looks like this.

    <?php
    
    // =============================================================================
    // TEMPLATE NAME: My Template
    // -----------------------------------------------------------------------------
    // A custom page template
    // =============================================================================
    
    ?>
    	
    <?php get_header(); ?>
    
      <div class="x-container max width offset">
        <div class="<?php x_main_content_class(); ?>" role="main">
    
          <?php while ( have_posts() ) : the_post(); ?>
            <?php x_get_view( 'integrity', 'content', 'page' ); ?>
            <?php x_get_view( 'global', '_comments-template' ); ?>
          <?php endwhile; ?>
    
        </div>
    
        <?php get_sidebar(); ?>
    
      </div>
    
    <?php get_footer(); ?><code></code>
    #1105676
    Rupok
    Member

    Hi there,

    Thanks for writing back. You can try placing them in theme root instead of views folder.

    Cheers!

    #1105743
    ericshew
    Participant

    Works! Yay! Thanks very much !

    #1105769
    Joao
    Moderator

    Glad to hear it,

    Let us know if we can help with anything else.

    Joao

  • <script> jQuery(function($){ $("#no-reply-1104021 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>