Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #195905

    Hi. I read this post
    https://kriesi.at/support/topic/enfold-background-colorstyle/
    and I am looking for something similar. I want to be able to use a color section and either have a color background or an image. But then I want the actually content to be included in a smaller white (possibly transparent) box. I see the code that will work in the above thread, but I don’t know where to put it. Each section I do this to would be different.

    my site is: http://lizybloomdesigns.com/zemasfoods3

    Thanks in advance!

    Lizy Bloom

    #196018

    Hey lizybloom!

    You can add a unique selector for each Avia Elements. Edit functions.php, find this code:

    if(isset($avia_config['use_child_theme_functions_only'])) return;

    Below, add this code:

    add_theme_support('avia_template_builder_custom_css');

    Add the Text Block inside the Color Section. Add a unique css selector on “Custom Css Class” field. For example, add “awesome-textblock”.

    You can add something like this on your custom.css or Quick CSS:

    .avia_textblock.awesome-textblock {
    background: rgba(255,255,255,.5);
    padding: 10px;
    width: auto;
    }

    Regards,
    Ismael

    #196313

    Hi. Thanks for the help, but that didn’t work right. When I tried to save the css, I got this error:

    Saving didnt work!
    The script returned the following error:
    Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home3/lizy/public_html/zemasfoods3/wp-content/themes/enfold/functions.php on line 22

    I tried to figure out what went wrong, but I couldn’t. I did notice that my line of code in functions.php looks like this:
    if(isset($avia_config[‘use_child_theme_functions_only’])) return;

    Any other ideas?

    #196467

    Hi!

    Did you add the code below line 16?

    add_theme_support('avia_template_builder_custom_css');

    What do you see on line 22 when you check functions.php?

    Cheers!
    Ismael

    #196689

    This is the top so many lines of my code…I don’t really know how to tell which is line 16 or which is line 22. I just looked for the line of code you send and inserted the add_theme_support right below it. Did you want me to replace it? I’m sorry…that was confusing.

    Thanks again for any help.

    <?php
    
    global $avia_config;
    
    /*
     * if you run a child theme and dont want to load the default functions.php file
     * set the global var bellow in you childthemes function.php to true:
     *
     * example: global $avia_config; $avia_config['use_child_theme_functions_only'] = true;
     * The default functions.php file will then no longer be loaded. You need to make sure then
     * to include framework and functions that you want to use by yourself. 
     *
     * This is only recommended for advanced users
     */
    
    if(isset($avia_config['use_child_theme_functions_only'])) return;
    /*
     * create a global var which stores the ids of all posts which are displayed on the current page. It will help us to filter duplicate posts
     */
    $avia_config['posts_on_current_page'] = array();
    
    /*
     * wpml multi site config file
     * needs to be loaded before the framework
     */
    
    require_once( 'config-wpml/config.php' );
    #196841

    Hi!

    Just place it at the bottom of functions.php instead. After that, you’ll see a another field called Custom CSS on every avia elements on the Advance Layout Builder.

    Regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Enfold Color Background with white content box’ is closed to new replies.