Tagged: x
-
AuthorPosts
-
July 26, 2016 at 2:23 pm #1104021
ericshewParticipantHi 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!
July 26, 2016 at 11:37 pm #1104596
RupokMemberHi 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.
July 27, 2016 at 12:36 pm #1105537
ericshewParticipantThank 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>July 27, 2016 at 1:48 pm #1105676
RupokMemberHi there,
Thanks for writing back. You can try placing them in theme root instead of views folder.
Cheers!
July 27, 2016 at 2:27 pm #1105743
ericshewParticipantWorks! Yay! Thanks very much !
July 27, 2016 at 2:36 pm #1105769
JoaoModeratorGlad to hear it,
Let us know if we can help with anything else.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1104021 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
