Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'wp_enqueue_scripts', 'child_enqueue_styles',99);
- function child_enqueue_styles() {
- $parent_style = 'parent-style';
- wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
- wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/custom.css', array( $parent_style ));
- }
- if ( get_stylesheet() !== get_template() ) {
- add_filter( 'pre_update_option_theme_mods_' . get_stylesheet(), function ( $value, $old_value ) {
- update_option( 'theme_mods_' . get_template(), $value );
- return $old_value; // prevent update to child theme mods
- }, 10, 2 );
- add_filter( 'pre_option_theme_mods_' . get_stylesheet(), function ( $default ) {
- return get_option( 'theme_mods_' . get_template(), $default );
- } );
- }
- add_action('wp_footer', 'ava_custom_script');
- function ava_custom_script(){
- ?>
- <script type=”text/javascript”>
- (function($) {
- function a() {
- $('.av-masonry-entry:not(“.lightbox-added”)').each( function() {
- $(this).attr('target', '_blank');
- $(this).attr('rel', 'nofollow');
- });
- }
- a();
- })(jQuery);
- </script>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment