Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a wordpress site, and I need to apply custom styles to one page, I see the custom styles option, and some of them work, but others get overwritten. Is there a way I can apply strictly my own styles to a portion of the page?

Thanks,

Brian

share|improve this question
3  
Your question is unclear - what is the 'custom styles' option? What theme/plugin are you using? Could this be more of a CSS question then a WordPress question? –  bungeshea Dec 9 '12 at 21:23
add comment

1 Answer 1

up vote 2 down vote accepted
  1. Open your theme functions.php.
    1. FTP/Server access: Navigate to your WP install and look in /wp-content/themes/[your theme folder]
    2. Via the WP Dashboard: Appearance > Editor, then look for Theme Functions (functions.php) in the right column
  2. Add the following to add a custom style sheet (replace "custom-style.css" with a better style sheet name, and replace 'your-page-slug' with the slug of the page you wish to add the custom style to):

    // script manager template for registering and enqueuing files
    function childtheme_script_manager() {
        // register custom style on your specific page
        if (is_page('your-page-slug')) {
            wp_register_style('custom-css', get_stylesheet_directory_uri() . '/custom-style.css');
            wp_enqueue_style ('custom-css-css');
        }
    }
    add_action('wp_enqueue_scripts', 'childtheme_script_manager');
    
  3. Create a style sheet in your theme folder called custom-style.css. Add your custom styles. Write the css to target whatever it is on your page that needs specific styling. Without anymore information or posting example code on that page, it's impossible to answer that.

share|improve this answer
    
Where is my theme folder, I have search endlessly for a "file upload" feature, but haven't found one. I'm a real CLI junky and I'm having a tough time with this bloated Graphical Interface. –  Brian Wheeler Dec 10 '12 at 23:15
    
Added the info into step one. :) –  Will Lanni Dec 11 '12 at 1:07
    
I see now I actually have to go in to my hosting client to modify the backend. That was very unclear. –  Brian Wheeler Dec 11 '12 at 3:26
    
Gotcha—my bad! Did the added info in step one clear that up? –  Will Lanni Dec 11 '12 at 6:34
    
Yes. Thanks for your answer. I think I've got the general idea now. Thanks a ton! –  Brian Wheeler Dec 11 '12 at 23:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.