WebMasterService N3rds@Work

PS Fundraising Templates – Custom Styling

Wikis > Piestingtal.Source Wiki > PS Fundraising Plugin > PS Fundraising Templates - Custom Styling

You can create new files inside your active theme’s root folder to be used when displaying a fundraiser.

There are 3 types of templates you can create.

Template Hierarchy

Single Fundraiser
wdf_funder-{ID}.php
wdf_funder-{slug}.php
wdf_funder.php

Fundraiser Checkout
wdf_checkout-{ID}.php
wdf_checkout-{slug}.php
wdf_checkout.php

Fundraiser Confirmation Page
wdf_confirm-{ID}.php
wdf_confirm-{slug}.php
wdf_confirm.php

== Custom Template Functions ==
You can change the location of the template-functions that are loaded in fundraising to an external location.
This will insure that any custom changes you make to your template functions are not broken when updating the plugin in the future.

Add a new define statement in your wp-config.php file containing a string pointing to the location.
define(‘WDF_CUSTOM_TEMPLATE_FUNCTIONS’,’/full-server-path/and/filename.php’);

== Custom Styles ==
Add any CSS file to your fundraising /styles/ folder for it to be available in your settings.

You can also create a folder named “wdf-styles” in your wp-content folder
OR
you can set an external location using the following code in your wp-config.php file.

define(‘WDF_EXTERNAL_STYLE_DIRECTORY’,’/full/server/path/to/styles/’)

By default the name of the style is the name of the file. You can manually adjust this using the “wdf_custom_style_name” filter

Example:
add_filter(‘wdf_custom_style_name’, ‘my_custom_filter_style_name’, 10, 2);

function my_custom_filter_style_name($name, $file_name) {
if($file_name == ‘my-file.css’) {
$name = “My Custom Style”;
}
return $name;
}

Wiki-Kategorie: Stichworte: