Forum Replies Created

Viewing 15 replies - 16 through 30 (of 45 total)
  • @oncletom:

    In which file can I change the WPPluginToolkitConfiguration class?

    Would I replace this..:
    $WPLessPlugin->getConfiguration()->setUploadUrl(get_template_directory_uri());

    ..with this?:
    $WPLessPlugin->getConfiguration()->setUploadDir(get_template_directory());

    Strange, are you saying the plugin should automatically create the absolute path for CSS images? It doesn`t for me.

    Something like this would still look the same after parsing:

    background: url('images/feed-readers.png') no-repeat left center;

    I have to use a variable to add the absolute path as explainded above:

    @base-url: "https://website-name.com/wordpress/wp-content/themes/theme-name";
    
    background-image: url("@{base-url}/images/bg.png");

    @oncletom:
    Thanks, I understand. It seems to be a WordPress folder permission issue then.
    Ideally however the bootstrap file should take care of that. Would it be possible to achieve a permission change to the current theme directory with the bootstrap file?

    It seems impossible to package a WP theme with the bootstrap file for distribution/sale, unless you uses a variable for the CSS image path. Also this fact need to be mentioned in the documentation.

    It does interrupt the normal WP work-flow a little where I would expect all project files in the theme folder.

    @obvio:
    It happens so often that a website is *not* done (we you think it`s done) and one has to go back and fix CSS. So I would not change the setup even on a client server.
    It`s unfortunate that we need this setup and parse into the upload folder first.

    Also when backing up an updated theme it`s easy to forget the parsed CSS file in the upload folder (ok, one still has the original .less file, but it feels not quite right somehow).

    I found a work-around for my main issue, background images in CSS.

    1.) First I am setting a variable with the absolut path to the image folder, like this:

    @base-url: “https://website-name.com/wordpress/wp-content/themes/theme-name”;

    2.) In your CSS use this variable to reference images:

    background-image: url(“@{base-url}/images/bg.png”);

    Still not really happy that the parsed CSS file ends up in the WP upload folder, but the above seems to work alright.

    Any new hints how to parse the CSS file directly into the WP theme directory appreciated.

    Hi Obvio, many thanks for your reply!

    Your solution works, but it has the same issue: the parsed CSS file is placed in the upload folder (within another folder named after my current theme).

    So I have the same issue again with my images, they do not link anymore to the correct place.

    Am I doing something wrong? I would like the parsed CSS file to be in the current theme folder…

    Many thanks for any hints!

    Ok, I tested the plugin method further and this does not work at all.

    The parsed style.css file needs to be in the current theme directory (not in the upload folder), since all my assets i.e. images are in the theme directory.

    Image files linked from the style sheet do not work anymore, since the location changed to the upload directory.

    I am actually wondering if there is anyone out there who could make this plugin work…

    Thanks for your quick reply.
    It`s fine if this is normal, I just thought I am doing something wrong.

    Ideally I would like to get the bootstrap method to work, but I am stuck.

    – Does the whole wp-less plugin folder need to be moved to the theme directory?

    – Do I need to move any file out of the “wp-less”folder into the theme folder i.e. bootstrap.php?

    – Do both code blocks need to go into functions.php, see below?

    – With what do I need to replace “/path/to/wp-less/”?

    require dirname(__FILE__).'/path/to/wp-less/bootstrap-for-theme.php';
    $WPLessPlugin->dispatch();
    
    add_action('wp', 'theme_wp_hook');
    
    function theme_wp_hook()
    {
      wp_enqueue_style('theme', $template_directory.'/style.less', array(), false, 'screen,projection');
    }

    Thanks a lot for you help.

    Plugin Method:

    I got this working by inserting this code into the functions.php:

    add_action('wp', 'theme_wp_hook');
    
    function theme_wp_hook()
    {
      wp_enqueue_style('theme', get_bloginfo('template_directory').'/style.less', array(), false, 'screen,projection');
    }

    However strangely my parsed CSS file is output into this folder (instead of my theme folder) using local MAMP setup:

    https://localhost:8888/wordpress/wp-content/uploads/wp-less/blank-theme/style.css

    Why does the stylesheet end up in the “upload” folder?
    How to fix this?

    Then I tried the below:

    Bootstrap Method:

    This is not working and your documentation is unfortunately quite confusing.

    Can you please clarify these issues:

    > * 1. In your theme, include the ‘wp-less’ anywhere you want. (eg: ‘wp- content/themes/yourtheme/lib/wp-less’)

    The “wp-less” means the whole plugin folder?

    > * 2. Include the required files in your functions.php file. (eg: ‘require dirname(__FILE__).’/lib/wp-less/bootstreap-theme.php’)

    This does not work, or my code does not work.
    I tried many variations similar to this:

    if (!class_exists('WPLessPlugin'))
    {
    require dirname(__FILE__).'wp-less/lib/wp-less/bootstreap-theme.php';
    $WPLessPlugin = WPPluginToolkitPlugin::create('WPLess', __FILE__, 'WPLessPlugin');
    }

    or this:

    if (!class_exists('WPLessPlugin'))
    {
    require get_bloginfo('template_directory').'/lib/Plugin.class.php';
    $WPLessPlugin = WPPluginToolkitPlugin::create('WPLess', __FILE__, 'WPLessPlugin');
    }

    Whenever I try that I get an error and the page stays blank after reload.

    Above you are recommending this code:

    add_action('wp', 'theme_wp_hook');
    
    function theme_wp_hook()
    {
      wp_enqueue_style('theme', $template_directory.'/style.less', array(), false, 'screen,projection');
    }

    Where does this code go, both in functions.php? Like this?:

    require dirname(__FILE__).'/path/to/wp-less/bootstrap-for-theme.php';
    $WPLessPlugin->dispatch();
    
    add_action('wp', 'theme_wp_hook');
    
    function theme_wp_hook()
    {
      wp_enqueue_style('theme', $template_directory.'/style.less', array(), false, 'screen,projection');
    }

    I am assuming I need to to change this part “/path/to/wp-less/”, but nothing seems to work i.e. get_bloginfo(‘template_directory’).

    Can you please provide some exact code with explanation where to place it?
    Please avoid variables like “/path/to/wp-less/”.

    Thanks again for providing this plugin, once it works it would be a huge time-saver!

    Thread Starter bento

    (@bento)

    I did not try that version, I usually do not work work with unstable development versions.

    Instead I found another plugins which does the same, but works like a charm:
    https://wordpress.mfields.org/plugins/taxonomy-images/

    I still have the same problem with version 1.3.3.
    The ciii_category_archive_image does not show up.

    Somehow the code you were referring to moved to this file but I can not find the correct place to fix the bug:
    class-Category-Images-II.php

    Thanks for any hints.

    I asked the Cart66 support:

    This is not a bug. You cannot use anything except the $ to add calculations at this time. This is only in the backend however. If you use a different currency symbol on your site, that will always appear to your customers. In the backend however, you must use the $ symbol to correctly calculate the prices.

    Works for me, good luck!

    Hi Damino52,

    Did you solve issue with the Zeus server? I have exactly the same problem. Please share.

    Many thanks!

    Thread Starter bento

    (@bento)

    I actually tweaked the WordPress site to have almost the same feature as WP Member, checking with “is_user_logged_in” if a user is logged in to view a certain category. In a way this is actually more convenient, since I do not need to block posts individually (blocking of entire categories is a feature WP Member does not provide yet, right?).
    So I am not using WP Member on this client site for now, unfortunately it’s close to being released and I can’t give access to it.

    I hope this info can help you to track down the issue:
    – WP 3.0.2
    – WP Member 2.3.2 (now deactivated)
    – Other active plugins: Contact Form 7, Hide Admin Panels, Hide Update Reminder, Hide WP Generator, Hide WP Update Reminder, Magic-fields, Peter’s Login Redirect, Remove Title Attributes, SimpleModal Login, Social Media Widget, all most recent version.

    The strange thing was that WP Member started blocking arbitrary posts – which were not blocked – of various categories all over the site.

    Many thanks, I appreciate that you are giving active support to your plugin.

    Thread Starter bento

    (@bento)

    @cbutlerjr, Thank you for checking on this issue.

    Actually I came across some other odd behaviour where the WP Member plugins blocks random posts (which are not blocked), otheres are not blocked as it should be. I have deactivated the plugin for now since the behaviour is too arbitrary.

    I don’t know if this is important, I used to have the Wishlist Member plugin installed (https://member.wishlistproducts.com/), but it’s deactivated. Did this plugin change some settings what`s blocked or not? Though it’s deactivated and I think it should not have any effect anymore.

    This worked for me:
    <?php echo do_shortcode('[contact-form 1 "Contact form 1"]'); ?>

    Hope this helps.

    Hi guys,

    This worked for me:
    <?php echo do_shortcode('[contact-form 1 "Contact form 1"]'); ?>

    Hope this helps.

Viewing 15 replies - 16 through 30 (of 45 total)