[Resolved] Link CSS particular to a template

Home Forums Support Link CSS particular to a template

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1332272
    Matthew

    What would be the best method to have a specific link style just for the attachment.php template file. I could use a class in each link there but is there a more ‘global’ way? Could a hook be suitable

    thanks,

    #1332325
    David
    Staff
    Customer Support

    Hi there,

    WordPress adds unique classes to the <body> tag for the different templates.
    The attachment pages is attachment. You can use it like so:

    body.attachment a {
    /* Body link styles here */
    }
    #1396521
    Matthew

    This sounds super.

    I close this for now as I have urgent other query but may post again.

    #1396855
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.