• Resolved danial

    (@danish63)


    Hello admin
    i want to edit card.php because on parent theme i was edit a code in that file. which can add “see more” button on all post that are showing on category page. but in plugin update my code is removed, now i want to override the card.php in child-theme without activating template. on parent theme i was not activating any template.
    Current-Path /wp-content/plugins/connections/templates/profile/card.php
    now i want to do same thing in child-theme
    how i can do in child-theme divi

    here is my code:
    <?php $content = $entry->getExcerpt();
    echo mb_strimwidth($content, 0, 400, ‘getPermalink().'”> Read more‘); ?>

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    What is the path that the override file is in?

    Thread Starter danial

    (@danish63)

    i want to override card.php in child-theme
    how i can override ??

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Ok, I thought you had already copied the file to another folder path. If you have not, you can read about template override files on this doc page:

    The tldr version is, put the card.php file in this folder:

    • ../wp-content/connections-templates/profile

    I hope this helps!

    Thread Starter danial

    (@danish63)

    i also mentioned that without activating template if i can activate template it can be change my website layout, can i override file without activating the template??
    when i activate template it will work.
    and can i over ride card.php in child theme

    • This reply was modified 4 years, 6 months ago by danial.
    Plugin Author Steven

    (@shazahm1hotmailcom)

    Yes, the override will be loaded even if it is not activated on the Connections Templates admin page (assuming you are using the template shortcode option to load the templates instead of the activated template).

    I hope this helps!

    Thread Starter danial

    (@danish63)

    i have also tried that but without activating template overriding can not work on Divi child-theme?
    is there is any hook or filter which i can use to override card.php

    Plugin Author Steven

    (@shazahm1hotmailcom)

    The template override will load regardless of the theme, it does not matter as there is no interaction with the theme. There also is no hook. If the file is in the right place, it will be loaded.

    If you are have altered the card.php file for the Profile template and that template is not activated on the Connections Template admin page you must use the tempalte shortcode option, like so:

    • [connections temnplate=profile]
    Thread Starter danial

    (@danish63)

    yes thankyou
    its working

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Great to hear!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘card.php cannot override in child-theme’ is closed to new replies.