All that formatting should be handled by either the SCABN’s /templates/default/style.css css file or whatever your WP theme does if SCABN’s css does not cover it. The best way to configure the look is to write your own css file and put it under SCABN’s directory in /templates/YOURTHEME/style.css and then configure SCABN to use the YOURTHEME theme.
I’m guessing there is some discrepancy between version 1.9.10 and this documentation or is my plugin not correct?
All I have in /templates directory is default.php. I’ve added a directory for my theme in /defaults and created a style.css for it: /templates/mytheme/style.css When I go to plugin options, the only theme listed is default.
What am I missing here or is there newer documentation for your plugin?
Thanks
Yes, the 1.9.X series (soon to be 2.0) is a major rewrite and how you configure it has changed. In the new system, there is only one file for templates: X.php in the templates directory. Take a look at templates/default.php for an example and instructions. In that .php file, you’ll want to add an include line your css file.
Forgive me for all the questions.. but the default.php does not have examples or instructions on how to add a custom theme/css to the plugin.
I’ve created a file /templates/mytheme.php
Now I see that in the drop down in the plugin. You said to “include” my CSS to this file. Is the “include” a php incude(); or a <link> for standard css file?
Thanks
I need to add that to the default.php documentation. You’ll want to change the scabn_add_css action. I believe this should work:
remove_filter('scabn_add_css',array($this,'add_css'),10,0);
add_filter('scabn_add_css','add_css',10,0);
function add_css() {
if (file_exists(SCABN_PLUGIN_DIR."/templates/yourfile.css")) {
$csslink = "<link href=\"".SCABN_PLUGIN_URL."/templates/yourfile.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
return $csslink;
}
}
Let me know if that works, and I’ll add instructions to the default.php
This worked.
I created a file /templates/mytheme.php
Pasted that code above into mytheme.php, edited it to point to mytheme.css
Created mytheme.css in the directory /templates.
Went to Plugin settings and selected mytheme in the dropdown and it is now working.
Thanks!
Ok, I put the documentation in SCABN 1.9.12