Add custom css to pages and single posts
-
I created a custom page template for pages within my child theme and also for single post pages–now I’m trying to figure out how to apply custom css to those pages. Here is my single post page template:
<?php
/**
* The Template for displaying all single posts.
*
* @package Omega
*/get_header(); ?>
<main class=”<?php body_class( ‘main_class’, ‘content’ );?>” <?php omega_attr( ‘content’ ); ?>>
<?php
do_action( ‘omega_before_content’ );
do_action( ‘omega_content’ );
remove_action( ‘omega_after_main’, ‘omega_primary_sidebar’ );
?></main><!– .content –>
<?php get_footer(); ?>
I successfully removed the sidebar with the line of code
remove_action( ‘omega_after_main’, ‘omega_primary_sidebar’ );
seen above and now my single post pages appear exactly the same, but as if there were an invisible sidebar on the right. I’m looking for guidance on how I can make the content centered on the page with a max width of 650px.
- The topic ‘Add custom css to pages and single posts’ is closed to new replies.