• Resolved roxer82

    (@roxer82)


    Hello,
    I’d like to add some extra lines to amp’s style.php:

    table thead {background-color:#e6f0f2;font-weight: bold}
    table tbody tr:nth-child(even) {background-color: #F5F5F5;}
    table tfoot {background-color:#F2F8F9;font-weight: bold}

    Is it possible to do it in my functions.php? Or should I make a copy of single.php into my theme_folder/amp and add it between <style amp-custom> and <style>?

Viewing 1 replies (of 1 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    In the Reader (Classic) mode, this is the code you can add to your theme’s functions.php to add the desired styles:

    add_action( 'amp_post_template_css', function() {
        ?>
        table thead {background-color:#e6f0f2;font-weight: bold}
        table tbody tr:nth-child(even) {background-color: #F5F5F5;}
        table tfoot {background-color:#F2F8F9;font-weight: bold}
        <?php
    } );
    • This reply was modified 5 years, 7 months ago by Weston Ruter.
Viewing 1 replies (of 1 total)
  • The topic ‘Add lines to amp Style’ is closed to new replies.