victorjonsson / Arlima

Article List Manager - Wordpress plugin suitable for online newspapers that's in need of a fully customizable front page
28 stars 16 forks source link

Create custom streamers #99

Closed heikkipeikki closed 7 years ago

heikkipeikki commented 7 years ago

I have followed your instructions from 'https://github.com/victorjonsson/Arlima/wiki/Custom-streamers' and tried to make two streamer-images as you can see below. I put the code last in arlima.php (was it the wrong place?). But as soon as I save arlima.php the site crasches. What am I doing wrong? The images are placed in the directory images inside my subthemes directory with file permissions set right:

-rw-r--r-- 1 www-data www-data 742 nov 2 11:30 radio-vinjett.png -rw-r--r-- 1 www-data www-data 459 nov 2 11:30 TV-vinjett.png

function my_streamer_images($streamers) { $theme_url = get_stylesheet_directory_uri(); $streamers[] = $theme_url . '/images/TV-vinjett.png'; $streamers[] = $theme_url . '/images/radio-vinjett.png'; return $streamers; } add_filter('arlima_streamer_images', 'my_streamer_images');

function my_streamer_colors($colors) { $colors[] = '007fc2'; // red $colors[] = 'b22e2a'; // red $colors[] = 'E2E2E2'; // gray $colors[] = '894b94'; // purple $colors[] = '901c27'; // GoteborgNu return $colors; } add_filter('arlima_streamer_colors', 'my_streamer_colors');

heikkipeikki commented 7 years ago

I discovered that the right place was in functions.php (as always).