Viewing 1 replies (of 1 total)
  • Plugin Author maltpress

    (@maltpress)

    Hi,

    This isn’t something I thought of doing – to be honest I wrote the plugin for a site I was working on and thought I’d release it into the wider world if anyone else needed it, so it kind of just does what I needed it to at the moment!

    You can do it yourself if you want to play with the code, though – it should be reasonably easy to get it doing what you want.

    There are two functions in scrollarama.php you’ll need to amend; pr_determineBackground(); on line 39 and pr_showPosts(); on line 95.

    The first, pr_determineBackground(); looks at whether a post has an attachment or something in the “slider” custom field; if it does, it creates a string called $background which has the CSS for the image, for example if it’s from the “slider” custom field:

    $background = "url(" . get_post_meta($looped_ID, 'slider', true) . ") center no-repeat;";

    You can change this to output <img> tags:

    $background = "<img src='" . get_post_meta($looped_ID, 'slider', true) . "' />";

    The pr_showPosts(); function is what creates the little loop to show the posts; amend this to call the pr_determineBackground(); function when you want to output your image, and change any css classes etc as you see fit. As long as this loop is within the div with the class pr_side_slider the cycle should work.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Scrollarama] Move Title / Text to Top?’ is closed to new replies.