Elementor: how do I customize the post_info widget in the single post template?

Question

I want to remove the url of the tags which are used only on one post. This is the piece of code of Elementor which generate the HTML:

I’ve found out that the piece of code is inside post-info.php, a class which is a widget inside the single post, but I don’t understand which is the logic for modifying Elementor without getting my file overwrited on their next release.

enter image description here

<?php if ( ! empty( $item_data['text_prefix'] ) ) : ?>
                <span class="elementor-post-info__item-prefix"><?php echo esc_html( $item_data['text_prefix'] ); ?></span>
            <?php endif; ?>
            <?php
            if ( ! empty( $item_data['terms_list'] ) ) :
                $terms_list = [];
                $item_class = 'elementor-post-info__terms-list-item';
                ?>
                <span class="elementor-post-info__terms-list">
                <?php
                    foreach ( $item_data['terms_list'] as $term ) :
                    if ( ! empty( $term['url'] ) ) :
                        $terms_list[] = '<a href="' . esc_attr( $term['url'] ) . '" class="' . $item_class . '">' . esc_html( $term['text'] ) . '</a>';
                    else :
                        $terms_list[] = '<span class="' . $item_class . '">' . esc_html( $term['text'] ) . '</span>';
                    endif;
                endforeach;

                echo implode( ', ', $terms_list );
                ?>
                </span>
0
, Revious 3 years 2020-06-04T05:10:28-05:00 0 Answers 90 views 0

Leave an answer

Browse
Browse