How do I style my new page template
-
Hi,
I’m not a coder but am trying to understand how I could make a new page template for my theme and style it. I have copied the page.php renamed it to page-nov-menu.php and uploaded it so now I have to page templates that are exactly the same. The new page template I want to style so it automatically adds a different margin to all pages using that template.Today I add the margin for each page in the style.css
.page-id-250 .art-post {
padding: 30px 30px 34px 230px;
}This is the page code
<?php /* Template Name: No vemnu */ ?> <?php get_header(); ?> <?php get_sidebar('top'); ?> <?php if (have_posts()) { /* Start the Loop */ while (have_posts()) { the_post(); get_template_part('content', 'page'); } } else { theme_404_content(); } ?> <?php get_sidebar('bottom'); ?> <?php get_footer(); ?>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Could I add the margin directly in the code? If not how do you add it to the style.css so it picks up the new margin. Have tried different ways and googled and seen so many fils and read so many tutorials but nowhere can I find a solution that I understand.
Any help would be very much appreciated.
- The topic ‘How do I style my new page template’ is closed to new replies.