Skip to content
Public Ticket #18895

elementor

Conversation thread

maciek_l replied

Customer Reply

Hi,

In style 20 "Big Grid", one photo is displayed vertically. Usually, a horizontal photo that is cropped vertically looks very ugly.
Therefore, using the ACF plug, I created a field for an alternative photo vertically and I display it there using the following code:

<?php if((penci_big_grid_count_classes( $bg, $biggid_style )==" bgitem-1") && !wp_is_mobile() && get_field('pionowe_zdjecie_wyrozniajace')) { ?>
                        <div class="penci-image-holder penci-lazy" <?php="" if(="" 'style-2'="=" $biggid_style="" ){="" echo="" '="" style="padding-bottom: '. penci_get_featured_image_padding_markup( get_the_ID(), $thumbnail, true ) .'%" ';="" }?=""> data-src="<?php echo wp_get_attachment_image_src(get_field('pionowe_zdjecie_wyrozniajace'), array('1170','780'))[0]; ?-->">
                        </div>
                        <!--?php } else { ?-->
                        <div class="penci-image-holder penci-lazy" <?php="" if(="" 'style-2'="=" $biggid_style="" ){="" echo="" '="" style="padding-bottom: '. penci_get_featured_image_padding_markup( get_the_ID(), $thumbnail, true ) .'%" ';="" }?=""> data-src="<!--?php echo penci_get_featured_image_size( get_the_ID(), $thumbnail ); ?-->">
                        </div>
                        <!--?php } ?-->

This works, but unfortunately overwrites when updating the template. I would like to avoid it because now I have to remember to improve this code every update.

Therefore, I would like to overwrite it somehow in the child theme. The method with changing any file in soledad will unfortunately not work.

Regards

PenciDesign Supporter replied

Staff Reply

Hi,

Can you tell me the reason why you need to modify the HTML code of this plugin?

After duplicating the folder, you need to change the class name, functions name, register it on "wp-content/themes/soledad/inc/elementor/includes/modules-manager.php" and modify many things. You should have knowledge about PHP to customize it.

Regards,
PenciDesign.


maciek_l replied

Customer Reply

What else do I need to change? I tried to add a twin folder calling it for example penci-af-big-grid, but unfortunately this module doesn't show anywhere after that.

PenciDesign Supporter replied

Staff Reply

Hi,

Unfortunately, you can't overwrite the Soledad Elementor widget on your child theme.

You can duplicate the "penci-big-grid" folder, rename and customize it as you want.

Regards,
PenciDesign.

maciek_l started the conversation

Conversation Start

Hi,

How can I overwrite your Elementator widget?

This is exactly about the file I need to modify:

/soledad/inc/elementor/modules/penci-big-grid/widgets/based-post.php

Can I overwrite it with a child theme? I tried to put it in my child theme along the same path but unfortunately it doesn't work.

Or maybe I have to create my own widget based on yours?

I'm waiting for help.

Regards

Want to join this conversation or access attachments? Sign in first.