Skip to content

Conversation

@alexandru-burca
Copy link

Issue:
If using a DIVI custom Layout the shortcode doesn't work properly. It goes automatically under content.

Cause:
On the official plugin on file called /monarch/js/custom.js, lines 507 -> 529, the plugin search the class et_social_inline_bottom and checks if the body element has the class et_pb_pagebuilder_layout and if that is the case it takes the social icons generated by the shortcode and puts under the content.

These are the lines:

// Move inline icons into appropriate sections in Divi theme
		if( $( '.et_social_inline' ).length ) {
			if ( $( 'body' ).hasClass( 'et_pb_pagebuilder_layout' ) ) {
				var top_inline = $( '.et_social_inline_top' ),
					bottom_inline = $( '.et_social_inline_bottom' ),
					divi_container = '<div class="et_pb_row"><div class="et_pb_column et_pb_column_4_4"></div></div>';

				if ($('.et-l--post').first().length > 0) {
					var $sections = $('.et-l--post .et_pb_section').not('.et_pb_fullwidth_section');
				} else {
					// Backwards compatibility before .et-l was introduced.
					var $sections = $('.et_pb_section:not(.et-l .et_pb_section)').not('.et_pb_fullwidth_section');
				}

				if ($sections.length > 0 && top_inline.length) {
					$sections.first().prepend(divi_container).find('.et_pb_row').first().find('.et_pb_column').append(top_inline);
				}

				if ($sections.length > 0 && bottom_inline.length) {
					$sections.last().append(divi_container).find('.et_pb_row').last().find('.et_pb_column').append(bottom_inline);
				}
			}
		}

A possible solution:
Since the class et_social_inline_bottom cause this and the class doesn't contain too much css code a possible solution is just to remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant