This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .video-container { | |
| position: relative; | |
| padding-bottom: 56.25%; /* 16:9 */ | |
| height: 0; | |
| iframe { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.nav li a').on('click', function() { | |
| if (/#/.test(this.href)) { | |
| // CODE | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* WPML */ | |
| function sp_language_selector_lang_code(){ | |
| $languages = icl_get_languages('skip_missing=0&orderby=code'); | |
| $i = 0; | |
| $len = count($languages); | |
| // If there is one or more languages | |
| if(!empty($languages)){ | |
| echo '<div id="lang_sel_list_custom">'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /************* EDITOR ACCESS *****************/ | |
| // Allow editors to manage Widgets and Menus | |
| function sp_editor_capabilities() { | |
| $editor = get_role( 'editor' ); | |
| if (!$editor->has_cap( 'edit_theme_options' ) ) { | |
| $editor->add_cap( 'edit_theme_options' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.search-toggle').on('click', function(e) { | |
| $('#search input').focus(); | |
| e.preventDefault(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "key": "group_57d2ab81d5362", | |
| "title": "Page Builder", | |
| "fields": [ | |
| { | |
| "key": "field_57d2abe0157fc", | |
| "label": "Content", | |
| "name": "content", | |
| "type": "flexible_content", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $fi_src = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), 'thumbnail_size' ); | |
| $fi_url = $fi_src[0]; | |
| // Returns featured image url, optional size argument. | |
| // Use like this: get_featured_image_url('thumbnail'); | |
| function get_featured_image_url( $size = "full" ) { | |
| global $post; | |
| $fi_src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size ); | |
| $fi_url = $fi_src[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p class="source-org copyright">© <?php echo date('Y'); ?> <?php bloginfo( 'name' ); ?>. <?php echo __('Delivered by'); ?> <a href="http://screenpartner.no/" target="_blank">Screenpartner</a>.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wf-loading { | |
| body { | |
| visibility: hidden; | |
| } | |
| } | |
| .wf-active, | |
| .wf-inactive { | |
| body { | |
| visibility: visible; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function is_post_type($type){ | |
| global $wp_query; | |
| if($type == get_post_type($wp_query->post->ID)) return true; | |
| return false; | |
| } |