This topic has 3 replies, 3 voices, and was last updated 9 years by Abe.

  • Author
  • #27464
     shoreline
    Participant

    I’m developing a child theme using Kleo as the parent theme. I’ve found that overriding most of the visual composer templates is as easy as creating a folder called ‘vc_templates’ in my child theme and adding a file with the same name as the one I want to override (ie- ‘vc_carousel.php’) works pretty well.

    But I’m having an issue trying to override a template for the VC shortcodes established in the ‘k-elements’ plugin. We want to add excerpts to the testimonials widget (if they are present) so I copied ‘kleo_testimonials.php’ from the k-elements plugin and put it in the same ‘vc_templates’ folder– no dice. I also tried adding that same file to a folder in our child theme that mirrors the one from the plugin (ie- ‘k-elements/shortcodes/templates’ and even ‘shortcodes/templates’) but that didn’t work either.

    Is there an easy way to override the templates for shortcodes in the K-Elements plugin or am I going to have to just create a new VC widget from scratch in my child theme? I’d prefer not to hack up the plugin code and keep everything in the child theme.

    #28526
     Abe
    Keymaster

    HI, yes you can override each template as in k-elements plugin under the shortcodes/templates/ by copying the desired file in your child theme in a folder named k_elements/ so the testimonials template will look like:
    kleo-child/k_elements/kleo_testimonials.php
    or a buddypress shortcode:
    kleo-child/k_elements/buddypress/kleo_bp_activity_page.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #40937
     davidvitorino
    Participant

    Hello @Abe,
    i am trying to change the plugin/k_elements/shortcodes/templates/buddypress/kleo_bp_members_grid.php to include only a type of user (like admin, edit, ecc)

    I have copied the file inside child theme into this folder:
    kleo-child/k_elements/buddypress/kleo_bp_members_grid.php

    But theme is still fetching the original, unmodified versione from plugin folder.

    Using wp4.1 and theme version 2.3.1

    Can you confirm that plugin template overriding is working as intended?
    Thankyou

    #41229
     Abe
    Keymaster

    Yes that is how it should be overridden. make sure the child theme is active…

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?