0

Possible Duplicate:
How To Include CSS and jQuery in my wordpress plugin?

I was going to add a button on a wordpress plugin

I want to add a style on button I know the basic way to call a css into a html file like.

<link rel="stylesheet" type="text/css" href="buttonPro.css">

but its not working on a php file

2
  • Show your code. Also check this stackoverflow.com/questions/3760222/… Commented Jan 12, 2013 at 9:24
  • The typically PHP file just outputs HTML, so that will work. (All else being equal, the usually rules of the cascade and having to have the right URL apply) Commented Jan 12, 2013 at 9:29

1 Answer 1

0

You can call it like this:

<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>
/css/style.css" media="screen" />

When your style sheet is living in a subdirectory called 'css' and the actual file is called 'style.css'. Don't forget to escape the HTML code in php:

<?php 
   put some php code here
?>

   **put some HTML code here**

<?php
   now you can continue with php
?>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.