Homepage Forums Dev & Debugging Page specific style in WordPress. Reply To: Page specific style in WordPress.

  • Satya Mukherjee

    Administrator
    December 23, 2020 at 11:15 am
    8836 Coins
    484 Gems
    Helpful
    Up
    0
    Down
    Not Helpful

    You can do this using PHP. Paste the following code in your WordPress theme’s function.php

    Note: It is advised to use a child theme to make sure updates do not affect your changes.

    if(basename($_SERVER['REQUEST_URI']) == 'customurl')
    { ?>
    <style>
    //style goes here
    </style>
    <?php }

    Change the ‘customurl’ with your required url for example ‘samplepage’

New Report

Close