setting backkground on single page on wordpress

Jonathan Duane
Jonathan Duane used Ask the Experts™
Hi Guys,

i am trying to set the background on a page using a plugin called Royal CSS and i have added this line in

background: url( no-repeat;

the page is but it just wont change...
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gregory MillerGeneral Manager

In your "style.css" you have this code which is setting the page background of the URL you provided:
body {
    -moz-text-size-adjust: none;
    background: rgba(0, 0, 0, 0) url("") no-repeat scroll 0 0 / cover ;
    color: #000;
    font-family: "proxima_novalight",Arial,sans-serif;
    font-size: 19px;
    line-height: 24px;
    overflow-x: hidden;

Open in new window

I know nothing about the plugin you are trying to use but you should be able to simply modify your CSS in the "style.css" file and be done.


yes but will not that set the background for the whole site, i only neewd/want it for one page
Web Applications Developer
ok, not sure what has been don to the theme but the body tag SHOULD have classes to identify the page

as in

<body class="home page page-id-242 page-template-default">

Open in new window

or in you case

<body class="page page-id-999 dentist1">

Open in new window

or similar which would allow you to target that page

or you can add something like this to the functions.php (not tested)

function add_local_css() {
	if ( is_page('dentist1') ){
		wp_enqueue_style('theme_name', get_bloginfo('template_directory').'/dentist1.css', null, '', 'screen, projection');
add_action('wp_head', 'add_local_css', 25);

Open in new window

Alicia St RoseOwner & Principle Developer/Designer
Please make sure you are using the CSS area in the Customizer for this or that you are on a child-theme. If you just edit the theme files your changes will be overwritten when the theme is updated!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial