shoshin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [Plugin: NextGEN Gallery] different slideshow per page in the header…Nevermind, just solved it myself:
<?php if (is_page('4') || $post->post_parent == '4' ) : ?> <?php if (function_exists("nggSlideshowWidget")) nggSlideshowWidget($galleryID=2,$Width=390,$Height=260); ?> <?php elseif (is_page('5') || $post->post_parent == '5' ): ?> <?php if (function_exists("nggSlideshowWidget")) nggSlideshowWidget($galleryID=3,$Width=390,$Height=260); ?> <?php endif; ?>
It’s always that last thing you try.
Forum: Fixing WordPress
In reply to: [Plugin: NextGEN Gallery] different slideshow per page in the headerI did something like this, to have a different slideshow per page:
<?php if (is_page('4') || $post->post_parent == '4' ) : ?> <?php if (function_exists("nggSlideshowWidget")) {nggSlideshowWidget($galleryID=2,$Width=390,$Height=260); } <?php elseif (is_page('5') || $post->post_parent == '5' ): ?> <?php if (function_exists("nggSlideshowWidget")) {nggSlideshowWidget($galleryID=3,$Width=390,$Height=260); } ?> <?php endif ?>
But NGG Slideshow just sits there showing the loading icon forever…
Anyone know what’s wrong? Some syntax problem with nested if’s?PS: Galleries exists, and images inside galleries present
Forum: Fixing WordPress
In reply to: Change Background Image per pageAnd… it’s working. Thanx PBP-Editor! Hope this solution is working for you too, Kons.
Now I’m thinking of a way to get the background-image’s filename from a page’s custom field, so management of background images will become a feature of page-editing. I’ll come up with the code here when I’m done.
Forum: Fixing WordPress
In reply to: Change Background Image per pageIt’s amazingly wonderful, yet logical. (i.e. Worked like a charm for background-color!) Would that work with posts as well? (As is_post has been depreciated and skipped since WP2.8.3)
PBP_Editor, Thank you so much for helping out!
Little problem: It’s working for the background-color, but not for the background image. Here’s the code, am I overlooking syntax errors?<?php if (is_page('4') ): ?> <style type="text/css"> body {background-image:url(images/bg-page4.jpg);} </style> <?php elseif (is_page('5') ): ?> <style type="text/css"> body {background-color:#ffffff;} </style>
bg-page4.jpg exists, and is at the path that is stated (copied it directly from the CSS original). Yet I get no background-image at page 4.
Forum: Fixing WordPress
In reply to: Change Background Image per pageOh, I figured you would just read my mind ??
I figured that you should be able to refer to the style-sheet to get a different background mark-up for any certain page, by creating a different class for that page in the stylesheet.
Secondly, to assign that class to the body, as it is the background image of the body that needs to be different per page.
So this is at the end of the header.php:<body class="page-id-<?php the_ID(); ?>">
If I’m on page 2, that line should return “page-id-2” as the class for the body.
Then in the style-sheet I have something like this:body{ background-image: url(images/image_default.jpg); } .page-id-2{ background-image: url(images/image_for_page2.jpg); }
… actually I don’t know if you can classify a body, hmm.
Forum: Fixing WordPress
In reply to: Change Background Image per pageI’m having the same problem. I can’t seem to find any thread that resolves this issue in understandable do-this-and-do-that language.
This is what I got from some site as code for a stylesheet sofar:
body.home { background-color: #cc0000; } body.page-id-2 { background-color: #ee00ee; }
In stead of altering the background-color that is done here, you should be able to change the background-image for other pages likewise.
However it’s not working in my stylesheet…
Ideas anyone?
(Not much of a code-writer by the way, or I wouldn’t be having this problem)