WordPress.org

Ready to get started?Download WordPress

Forums

Download Monitor
Customising CSS and download page code (2 posts)

  1. David Hunt
    Member
    Posted 2 years ago #

    Hi,

    If I want to customise the CSS and download page code, I can see that I need to edit the files in the folder named "page-addon".

    Is it possible to copy that folder to my theme directory, so that any modifications I make are not overwritten when the plugin is updated?

    I tried copying it to wp-content\themes\mytheme\plugins\download-monitor\page-addon but the changes were not picked up. The plugin still uses the original files in the plugin folder. (If it makes a difference, my theme is actually a child theme.)

    David

    http://wordpress.org/extend/plugins/download-monitor/

  2. David Hunt
    Member
    Posted 2 years ago #

    I found half an answer. Editing download-monitor-page-addon.php, I changed the line (very near the beginning of the file):

    $wp_dlmp_root = $wp_dlm_root.'page-addon/';

    to

    if (is_dir(get_stylesheet_directory().'/plugins/download-monitor/page-addon')) {
    	$wp_dlmp_root = get_stylesheet_directory_uri().'/plugins/download-monitor/page-addon/';
    } else {
    	$wp_dlmp_root = $wp_dlm_root.'page-addon/';
    }

    Then, if I put a customised styles.css file in wp-content\themes\mytheme\plugins\download-monitor\page-addon, this one gets picked up instead of the default.

    However, this does not solve the problem of customising the actual PHP code that outputs the download page itself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic