WordPress.org

Ready to get started?Download WordPress

Forums

Design Approval System
[resolved] V2.8 using wp3.4.2 + bp1.6 + child theme - how to override css? (4 posts)

  1. rcain
    Member
    Posted 1 year ago #

    Hi,

    Firstly, thanks for writing this great looking plugin. i think it will be very useful indeed and look forward to purchasing a few of the extensions from you.

    1 problem/question so far:

    how do i override plugin' slickremix theme css?

    - ie what directory structure should the various plugin' slickremix theme file copies be placed in under /wp-content/themes/my-child-theme-dir/ - eg: ./plugins/design-approval-system/css/style.css ?

    or where?

    in particular also: the slickremix theme supplied looks great, BUT, the std output styling within the 'approval' preview views, doesn't respect css clear, etc on eg. html p tags and others.

    my client needs to be able to produce/publish html-based ad copy content as well as just images.

    thanks for any help you can provide.

    rob cain

    V2.8 using wp3.4.2 + bp1.6 + child theme - how to override css?

    http://wordpress.org/extend/plugins/design-approval-system/

  2. slickremix
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for taking the time to explain your problem.

    For now I believe you need to copy the file in this path to your child theme folder:
    plugins/design-approval-system/templates/slickremix/das-slickremix-template.php

    The css for the main template file can be found in:
    plugins/design-approval-system/templates/slickremix/css/styles.css

    The main template file if you wanted to add a custom css path:
    plugins/design-approval-system/framework/das-default-template.php

    It's now apparent that we need to add a way for people to add custom styles without fear of losing changes when updates happen.

    I understand your issue with the content area not having default styles. This was not thought of since we figured most would be using it for simple images. However I can definitely see the value in having those styles in there, so on our next update we will add them.

  3. rcain
    Member
    Posted 1 year ago #

    hi slickremix,

    thanks for the fast reply.

    yep got all that. in case this is helpful to anyone else out there: in order to override the standard plgin css file here what i did was apply a temporary hack to the plugin file:

    /wp-content/plugins/design-approval-system/framework/das-default-template.php

    - at the top of that file, replace the existing hardcoded html link to plugin's css file with the following (or similar):

    <?php
    //mod jrc 290112 - allow stacked child theme plugin override css's
    $scl_stylesheet_file_path = get_stylesheet_directory() . "/plugins/design-approval-system/templates/slickremix/css/" . "styles.css";
    if (@file_exists($scl_stylesheet_file_path)) {
            $scl_stylesheet_file_uri = get_stylesheet_directory_uri() . "/plugins/design-approval-system/templates/slickremix/css/" . "styles.css";
    ?>
    				<!--scl child theme plugin ovverride for das template CSS-->
            <link rel="stylesheet" type="text/css" media="all" href="<?php print $scl_stylesheet_file_uri;?>" />
    <?php
    } else {
    				//orig ok:
    ?>
    				<!--default das template CSS-->
    				<link rel="stylesheet" type="text/css" media="all" href="<?php print DAS_PLUGIN_PATH ?>/design-approval-system/templates/slickremix/css/styles.css" />
    <?php
    } //end if
    // maybe: Enqueue the style sheet
    // maybe:    wp_enqueue_style('etc');
    //mod jrc 290112 - allow stacked child theme plugin override css's
    ?>

    - i think this is pretty wp/plugin/child-theme-friendly, but migt be improved further to search a wider selection of possible places peolple might want to store plugin override stuff for their thems.

    - i suspect also, you might want to do similar logic for all plugin template files, js files, etc - else provide some further wp custom hooks and filters to facilitate same.

    all best

  4. slickremix
    Member
    Plugin Author

    Posted 1 year ago #

    Awesome, so nice to see some valid input and an example too! We will be making an update shortly and will include this method and give you credit for it as well. Keep those ideas and solutions coming!

    Thanks Rcain!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic