Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

Soylent Brice

(8,308 posts)
Thu Apr 18, 2013, 11:21 AM Apr 2013

wordpress question

I wrote two pages for a friend for his site. Only problem, when I paste the code in everything gets all jumbled and fucked. Conflict between my css and Wordpress I suppose.

Is there any way to kill Wordpress theme css?

I have an ftp account, just need some suggestions.

Thanks in advance.

10 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
wordpress question (Original Post) Soylent Brice Apr 2013 OP
You can test if that is the problem with the developer toolbar. ChromeFoundry Apr 2013 #1
oooooohh Soylent Brice Apr 2013 #2
okay Soylent Brice Apr 2013 #4
where are you pasting your CSS in? Phillip McCleod Apr 2013 #3
see post # 4 please! Soylent Brice Apr 2013 #5
RE: #4.. gotcha. Phillip McCleod Apr 2013 #6
Message auto-removed Name removed Jul 2021 #7
Post removed Post removed Apr 2022 #8
Spam deleted by MIR Team henryjonas59 Mar 2023 #9
WordPress Related Query jamesmillere Jun 2023 #10

ChromeFoundry

(3,270 posts)
1. You can test if that is the problem with the developer toolbar.
Thu Apr 18, 2013, 01:25 PM
Apr 2013

Press F12, in the Style section, disable the WordPress css references.
This will allow you to display the page would it would look without specific css tags.

When all else fails, use the "!important" tag on your css to override the WordPress styles.

Soylent Brice

(8,308 posts)
4. okay
Thu Apr 18, 2013, 08:42 PM
Apr 2013

!important didn't work. <---sadface

let's pretend i know jack shit, but i'm REALLY good with instructions.

i'm logged in as admin on the wordpress site
i'm in the edit page section

i can paste whatever code i want in there.
how do i get wordpress' bullshit to stop? lol

or

i have an ftp acct for the site also
where on earth do i go to disable the existing css and/or theme?

again, the help is super appreciated!

 

Phillip McCleod

(1,837 posts)
6. RE: #4.. gotcha.
Thu Apr 18, 2013, 09:48 PM
Apr 2013

..i'm now officially 'pretending'.. i'll even try to use capitals once in a while below.

Two parts (1) my guess, (2) request for more info ..

(1) my guess is you're pasted css into a WP page or post's HTML editor. CSS has to be treated separately, tho, since it's loaded before HTML (before JS, too). Wordpress 'has an app for that' as they say. Activate and use WP's official Jetpack > Custom CSS plugin. Here's a link for more info.. http://jetpack.me/support/custom-css/

So use that plugin for your custom css. Then you don't have to completely disable WP's templates.

If you have a whole CSS style you want to show off instead of one of WP's, you can do that too, but then you have to worry about How-To hook into WP's API. Better off reading up on Wordpress Child Themes. You can do a lot with a minimalist parent theme. Here's a link.. http://codex.wordpress.org/Child_Themes (pro tip: these actually work as advertised and you can do a lot with very little).

The idea is to separate the styles from the content so that styles aren't wiped out on updates. It centralizes it. Plus WP generates styles on the fly that you the developer may or may not choose to hook into. Check out the WP Codex for lots more info and tutorials.

(2) Here's how we do it on http://stackoverflow.com .. you paste some of your code here (don't worry about white space, that's just DU..) and we tell you what we think you did wrong. You don't have to paste it all. Just snippets that you think are worrisome with some explanation of exactly what you in as much detail as you feel is needed.

..

Good luck!

Response to Soylent Brice (Original post)

Response to Soylent Brice (Original post)

Response to Soylent Brice (Original post)

jamesmillere

(4 posts)
10. WordPress Related Query
Tue Jun 6, 2023, 12:22 AM
Jun 2023

When you encounter conflicts between your custom CSS and the WordPress theme CSS, there are a few possible solutions to consider:

Use Specificity and CSS Selectors: Ensure that your custom CSS has sufficient specificity to override the conflicting WordPress theme CSS. You can use more specific selectors or apply inline styles to prioritize your styles over the theme's styles.

Use !important: Add the !important declaration to your custom CSS rules. This can forcefully override conflicting styles from the WordPress theme. However, it is generally recommended to use !important sparingly and only when necessary.

Disable Specific Theme Styles: If you have identified the specific CSS rules causing conflicts, you can disable them selectively. Inspect the elements on your site using browser developer tools and find the conflicting styles. Then, in your custom CSS, add rules to disable or modify those specific styles.

Create a Child Theme: If you plan to make significant changes to the theme's CSS, it's a good practice to create a child theme. This way, you can make modifications without altering the original theme files directly. You can then enqueue your custom CSS file to override the theme styles.

Modify Theme Files: If you have FTP access, you can directly edit the theme files to remove or modify the conflicting CSS rules. However, be cautious as modifying theme files can impact future updates and may require reapplying changes after updates.

Remember to take appropriate backups and exercise caution when making changes to your site's code. It's advisable to test changes in a development environment or staging site before implementing them on your live site.


Thanks
James Millere

Latest Discussions»Retired Forums»Website, DB, & Software Developers»wordpress question