• Hei,

    I searched through the forum and the web but couldn’t come up with a solution for an actual problem:

    Would like to have a custom background (a shabby cut-through desk since we’re working with linocut) on the main page, where the post-it-post-miniatures are shown.
    If you click on a post (or page link), I would like to have a monochrome background.

    https://www.buchkinder.de/wordpress is our site.

    So far, I believe to understand, that this part

    #content-wrapper {
    	background:url(images/content-bg-rpt.gif) repeat;
    	padding:20px 0; padding:2.0rem 0;
    	min-height:400px; min-height:40.0rem;
    	}

    in the stylesheet overwrites the background images of each and every other page: if I change the img url here, the shown result changes. I tried to build in code bits with the image-id of single pages to change the background, but failed (guess, I put it in the wrong place). Tried the plugin ?background per page?, but it doesn’t seem to work neither.

    I appreciate any hint, thanks in advance ??
    buchkinder

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can include in-line CSS calls on the individual template pages.

    For example, set the default background in the global style sheet and then add

    <style type="text/css">
    code {
    ...
    }
    </style>

    in the footer of the individual template pages so that it overrides the global.

    You can also use conditional calls in the header, but that is more complicated because it will require some knowledge of PHP and you can do the same thing with the way mentioned above.

    Thread Starter buchkinder

    (@buchkinder)

    Thanks for the quick response ??

    The individual templates page ist my ?page.php?, right?
    I put your code in the section I consider the footer, but it didn’t work, probably, because I didn’t put it in the right place.

    But: in the page.php I found the following:

    * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package Sampression-Lite
     * @since Sampression Lite 1.0
     */

    Unfortunately the text doesn’t say which other template.
    Any ideas?

    Thread Starter buchkinder

    (@buchkinder)

    I tried and tried in different ways, but it really doesn’t work.
    In the pages.php used by the Sampression-Theme I could find the line

    <?php get_footer(); ?>

    Does this mean, that the pages.php gets the footer from somewhere else (and that I have to put the code bit mentioned above in there somewhere)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Sampression] custom background on single pages an on posts’ is closed to new replies.