Home>Support>Custom contact.php file in my child theme folder.

Custom contact.php file in my child theme folder.

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi everyone

I’m trying to use a custom contact.php file for the contact form widget in a website which I’m working on, using Page Builder and Widgets Bundle. (The entire purpose of this is change the error messages when a user submits invalid information)

I’m usign the following code based on the documentation for ‘Extending existing widget’:

function cerena_contact( $filename, $instance, $widget ){
    if( !empty($instance['design']['theme']) && $instance['design']['theme'] == 'tm-beans-child') {

        $filename = get_stylesheet_directory() . '/sow/contact.php'; 
    }
    return $filename;
}
add_filter( 'siteorigin_widgets_template_file_sow-contact-form', 'cerena_contact', 10, 3 );

But it seems like I doing something wrong beacuse there isn’t any change.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi Hunef39

    Thanks for the big wait.

    Hopefully, you’ve made some progress with this challenge. Unfortunately, at the moment we aren’t able to provide development level support like this on the forums. If you’re ever interested in getting help on that level we recommend Codeable.io.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More