Enfold Documentation
  • Home
  • Changelog
  • Support
  • Menu Menu
  • Link to X
  • Link to Dribbble

Widget Area

Add a sitewide notification bar! Access widget area to display your information here.

Stacked widget area, logo and menu.

Phone: 601-785-8085

Search Search

Click me Call to Action Click Again
100%

Faster and smarter!

Grid RowAnimated CountdownPortfolio GridAnimated NumbersBlog PostCatalogueCode BlockCommentsContent SliderContact FormFullwidth Sub MenuHeadline RotatorIconIcon BoxIcon ListMasonryMailChimp SignupMagazineAccordion SliderTeam MemberTestimonialsTabsTableSocial Share ButtonsSeparator / WhitespacePromo BoxProgress BarPost SliderVideoPartner/Logo ElementMasonry GalleryImage With HotspotsGoogle MapImageGalleryFullwidth Easy SliderFullscreen SliderNotificationAnimationBreadcrumbsTab SectionsStretched LayoutEnfold showcaseHosting RequirementColor SectionAccordionFeatured Image SliderEasy SliderAdvanced LayersliderColumnsFooterIntro to layout builderPaginationButtonSpecial headingAdd custom CSSAdd Custom JS or PHP ScriptEnfold ChangelogMenuHeaderMega MenuLogooptimizationHooks and FiltersLightboxShopPersonalize themesidebarSearchTranslationTypographyExample of Widget Left, Logo center, Menu rightExample of Widget Left Menu center Logo rightHow to use the custom codeHow to clear the cacheExample of color section overlayFullwidth ButtonButton RowChild ThemeQuick setupTheme RegistrationPage SetupImport DemosInstall enfold themeTheme updateBackup WordPress SiteBackup custom post typesBackup theme settingsInstall WordPress on localhostPrivacy & CookiesGoogle AnalyticsInstagramCustom Element TemplatesOpenStreetMaps - Leaflet MapsAccessibilityIcon CirclesChart ElementCustom Layout & Dynamic ContentDismissible Admin Notice BoxSVG Icon Sets

Widget one

Widget two

Video Widget background

Gallery

Overview

A gallery can be created with the default WordPress Gallery Option, or with the Gallery Element.

When using the WordPress Gallery Option, the image size of gallery pics is set automatically when the theme is activated, all you have to do then is to insert the gallery shortcode with a max of 7 columns.

Examples of Gallery element.

Code Snippet

How to use the snippets?

  • Add the CSS Snippets to Enfold child theme styles.
  • Add the JS and PHP scripts to your child theme functions.php file.
  • Shortcodes can be used in a text area in pages, posts, sliders and widget areas. Enable debug mode to view the page shortcode.
  • Enable custom CSS class name support to add your class names to the theme elements.
  • Disable script merging and clear the cache to view the changes on the frontend.

NOTE: If the code snippets produce a different result on your site, it may be because the settings on your site are different or due to any customization already added to achieve a similar result. Please try removing your customization if any and feel free to change the values in the example codes to suit your design.

Shortcode

[av_gallery ids='' style='thumbnails' preview_size='portfolio' crop_big_preview_thumbnail='yes' thumb_size='portfolio' columns='5' imagelink='5' lazyload='avia_lazyload' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='av-3irfg3']

Customization

Caption text style

The gallery image captions can be custom styled using the CSS code below.

 /* Gallery image caption */
.mfp-gallery .mfp-image-holder .mfp-figure .mfp-title {
	/* Your style here */
 }

 /* Image counter */
 .mfp-gallery .mfp-counter {
 	/* Your style here */
 }

Tooltip

To custom style the image tooltip please use the CSS below.

 /* Tooltip */
.avia-tooltip {
	/* Your style here */
}

To hide the image tooltip please use the CSS below.

/* Hide tooltip */
.avia-tooltip {
	display: none !important;	
}

Display caption below thumbnails

To display the caption below the thumbnail images please use the CSS below.

/* Display caption below thumbnail */
#top .avia-gallery .avia-gallery-thumb a:after {
content: attr(title);
margin: 10px 0;
position: relative;
display: block;
width: 100%;
font-size: 10px;
text-align: center;
}

Space between thumbnail gallery images.

To adjust the spacing between the images, play around with the margin values in the code below.

/* Gallery thumbnail spacing*/
#top .gallery .gallery-item {
    margin: 10px 10px 0 0;
    }

Gallery style – 1

By default, the gallery thumbnail is displayed at the bottom of the big image. In this example let’s take a look at gallery thumbnail alignment. How we can move it to the right side of the big image. Start by adding a custom CSS class name “av-gallery-style-1” to the gallery element.

Code snippet:

Shortcode

[av_gallery ids='3529,1183,1057' style='big_thumb' preview_size='portfolio' crop_big_preview_thumbnail='avia-gallery-big-crop-thumb' thumb_size='portfolio' columns='5' imagelink='lightbox' lazyload='avia_lazyload' av_uid='av-jgesnq4m' custom_class='av-gallery-style-1' admin_preview_bg='']

CSS

/*----------------------------------------
// CSS - Gallery style -1
//--------------------------------------*/

.av-gallery-style-1.avia-gallery {
display: flex;
flex-direction: row;
}

.av-gallery-style-1 .avia-gallery-big {
flex-basis: 80%;
}

.av-gallery-style-1 .avia-gallery-thumb {
display: flex;
flex-wrap: wrap;
flex-basis: 20%;
align-self: flex-start;
}

.av-gallery-style-1 .avia-gallery-thumb a {
flex-basis: 50%;
width: 50%;
}

Add title attribute to new inserted image via “Add Media” button

In WordPress core, when adding an image to standard WP tinyMCE editor with the “Add Media” button the title tag is skipped and no longer supported:

“For both accessibility and search engine optimization (SEO), alt text is more important than title text. This is why we strongly recommend including alt text for all your images.”

Following snippet adds the title attribute to new added images.

/**
 * Add title attribute to new inserted image via "Add Media" button
 * 
 * @since 4.8.2
 * @param string $html
 * @param int $id
 * @param string $caption
 * @param string $title				is always empty because removed by WP
 * @param string $align
 * @param string $url
 * @param string $size
 * @param string $alt
 * @return string
 */
function handler_image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) 
{
	//	if title attr already exist, return unmodified
	if( false === strpos( '<img ', $html ) || false !== strpos( 'title=', $html ) )
	{
		return $html;
	}
	
	$html = str_replace( '<img ', '<img title="' . esc_attr( get_the_title( $id ) ) . '" ' , $html );
	return $html;
}

add_filter( 'image_send_to_editor', 'html_insert_image', 10, 8 );

Resource

Contributed video:

Gallery Element Tutorial

Contents

© Copyright - Enfold Documentation - Enfold Theme by Kriesi
  • Privacy Policy
  • Legal Information
Scroll to top Scroll to top Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

OK

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Google Analytics Cookies

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Other cookies

The following cookies are also needed - You can choose if you want to allow them:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Accept settingsHide notification only