ReGEN page on GEN

https://www.genengnews.com/regenopen/

Page is built in tagdiv but it also uses the custom css style sheet, regen.css, because the styles needed to give the page the Re:GEN look were breaking the GEN styles needed on the rest of the site. The page had to have its own style sheet, which is located in: /var/www/vhosts/i-0a3c8578506150120/wp-content/themes/genengnews

There is a line of code at the top of the functions.php file which is in the same folder location that defines the style sheet for that page

function theme_enqueue_styles()
{

    wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', TD_THEME_VERSION, 'all');

    wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array(
        'td-theme'
    ), TD_THEME_VERSION . 'c', 'all');

}
Click to copy

We added this line of code to the above code snippet:

if ( is_page(169779) ) {
      wp_enqueue_style( 'regen', get_stylesheet_directory_uri() . '/regen.css' );
    }
Click to copy

This is how the code appears on GEN prod now:

function theme_enqueue_styles()
{

    wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', TD_THEME_VERSION, 'all');

    wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array(
        'td-theme'
    ), TD_THEME_VERSION . 'c', 'all');

 if ( is_page(169779) ) {
      wp_enqueue_style( 'regen', get_stylesheet_directory_uri() . '/regen.css' );
    }
}
Click to copy

169779 is the id for the page. If you need to enqueue another css sheet for a page, you can use the same if statement and change the references for the style sheet and the page id for the page it should be used for. You can get the page id by going to the page you want to edit in admin and grabbing it from the url. The id is the # after the post= in the url to edit the page.