- This topic has 3 replies, 2 voices, and was last updated 5 years, 5 months ago by
Tom.
-
AuthorPosts
-
December 16, 2016 at 8:24 pm #255566
Patrick
Hi Tom,
I need your help. Pleas let me know, how I can create an selectable page template, which not wrap the content primary with “inside-article”. If I create an page within wp-admin, every page is wraped with “inside article”. I need a page template for choose, which has this not. I know, I can work with simple css on this page and define some css for this page. But I need this page option sometimes more and like to have an separate page template for choosing.
Could you please let me know how I can do this?
I have crated an page within my child theme which is called page-no-wrap.php and put in the informations from page.php. On top I have marked it as page template with the following code:
/* *Template Name: no wrap */
I can now choose this template. But what have I to do, that only the “inside-Article” all over Wrap is not shown and the paddings etc. for this inside-article are not active?
What will I do? I like to do to make the same template like the blog view, because I have shortcode for custom posttype to insert in page and like to adapt the blog style. All is fine, but there is everytime the “inside-Article wrap wich is shown as background for my new cpt pages.
otherwise, how can I create a page with shortcode which use archive template π
Sorry if my questions are confusing. I’m confused too π
thanks and regards
patrickDecember 17, 2016 at 12:29 am #255590Tom
Lead DeveloperLead DeveloperHi there,
If you copied a template like page.php for your custom page template, you should see a line like this:
<?php get_template_part( 'content', 'page' ); ?>
You should replace it with something like this:
<?php get_template_part( 'content', 'nowrap' ); ?>
Then copy the content-page.php and add it to your child theme, and rename it to: content-nowrap.php.
In there you can remove the
inside-article
class and do whatever else needs doing.Hope this helps π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 18, 2016 at 7:15 am #255876Patrick
Thanks for this Infos, this puts some more infos to my brain π
December 18, 2016 at 10:58 am #255935Tom
Lead DeveloperLead DeveloperNo problem! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.