Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #427765

    I tried to add a shortcode to the Enfold Child found on this link http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    I have last year I previously added it to the main Enfold theme but that was before I knew better. Is there something I am missing that is not in the above link?

    Added this to the Child function.php:
    add_filter(‘avia_load_shortcodes’, ‘avia_include_shortcode_template’, 15, 1);
    function avia_include_shortcode_template($paths)
    {
    $template_url = get_stylesheet_directory();
    array_unshift($paths, $template_url.’/shortcodes/’);

    return $paths;
    }

    Created a folder called shortcodes

    Added a shortcodes.css with this:
    /* ======================================================================================================================================================
    Feature Badge
    ====================================================================================================================================================== */
    .avia-feature-badge{width: 100%; background-color:#ffffff !important; background-position:center; overflow:hidden; clear:both;}
    .avia-feature-badge:hover {background-color:#3399ff !important; background-opacity: 0.7; }
    .avia-feature-badge h3{color:#333333 !important;}
    .avia-feature-badge:hover h3{color:#ffffff !important;}
    .feature-badge-title{color: #333333; width: 100%; display:inline-block; background: transparent; padding: 10px 14px; margin-top:0px; margin-bottom: 0px;}
    .avia-feature-badge:hover .feature-badge-title{color: #ffffff !important;}
    .feature-img-container{position: relative; text-align: center; width: 100%; height:80%; background-size:cover; background-position: center !important;}
    .avia-feature-badge:hover .feature-img-container{opacity: 0.7;}

    .avia-feature-badge{
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size:20px;
    opacity: 1;
    top:0; left:0; right:0; bottom:0;
    text-align: left;
    height: 200px;
    margin-top:0px;
    margin-bottom:10px;
    clear:both;
    }

    #427898

    Hey gciad!

    You can place modified shortcode files ( which are inside Enfold/config-templatebuilder/avia-shortcodes on parent theme ) or create new ones inside that new folder. If you are going to only add custom CSS code, you can add it to style.css file of your child theme.

    Best regards,
    Yigit

    #427904

    Thanks, I forgot to upload the feature.php to the shortcodes folder. Works great now.

    #427910

    Hi!

    Glad you figured it out! :)
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Enfold Child ShortCodes’ is closed to new replies.