Tagged: x
-
AuthorPosts
-
July 12, 2016 at 1:33 am #1082687
joe cParticipantThe child theme has broken on the live site. I have not made any changes to the site to cause the break. I have a local offline copy working perfectly. The parent theme is working fine though. Any help would be appreciated.
Here is the site link:
http://www.powerplants.com.auBelow is the child theme php:
<?php function child_script(){ wp_enqueue_style ('xchild-sticky-style', get_stylesheet_directory_uri().'/css/component.css' ); wp_enqueue_script('xchild-sticky-bounce-script', 'http://cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js', array(jquery),01102014,true); wp_enqueue_script('xchild-sticky-script', get_stylesheet_directory_uri().'/js/jquery.stickyheader.js', array(jquery),01102014,true); } add_action('wp_enqueue_scripts','child_script'); //first we register the separate stylesheets for the pages with the jquery tables function register_more_stylesheets() { wp_register_style( 'stylesheet_name', get_stylesheet_directory_uri() . '/css/skills.css' ); wp_register_style( 'stylesheet_solution', get_stylesheet_directory_uri() . '/css/solutions.css' ); } //Adding the skills matrix css to the about page function add_my_stylesheet() { if ( is_page(array('about', 'projects'))) // using page slug wp_enqueue_style( 'stylesheet_name' ); // no brackets needed for one line and no else } add_action( 'init', 'register_more_stylesheets' ); // should I use wp_print_styles hook instead? add_action( 'wp_enqueue_scripts', 'add_my_stylesheet' ); //Adding the solutions css to the solutions page function add_another_stylesheet() { if ( is_page(array('challenge-solutions','javo-potting-machines','fertigation-comparisons','training','service'))) // using page slug wp_enqueue_style( 'stylesheet_solution' ); // no brackets needed for one line and no else } add_action( 'init', 'register_more_stylesheets' ); // should I use wp_print_styles hook instead? add_action( 'wp_enqueue_scripts', 'add_another_stylesheet' ); function wpb_imagelink_setup() { $image_set = get_option( 'image_default_link_type' ); if ($image_set !== 'none') { update_option('image_default_link_type', 'none'); } } add_action('admin_init', 'wpb_imagelink_setup', 10); //Search for the media category only function SearchFilter($query) { if ($query->is_search) { $query->set('cat','3'); } return $query; } if(!is_admin()) add_filter('pre_get_posts','SearchFilter'); // Recent Posts - Adding EXCERPT to recent_posts shortcode + Add Custom Image Size // ================================================================================ function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if ( count($excerpt) > $limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'.'; } else { $excerpt = implode(" ",$excerpt); } //$excerpt = preg_replace('<code>\[[^\]]*\]</code>','',$excerpt); return $excerpt; } function x_shortcode_recent_posts2( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'type' => '', 'count' => '', 'category' => '', 'offset' => '', 'orientation' => '', 'no_image' => '', 'fade' => '' ), $atts ) ); $id = ( $id != '' ) ? 'id="' . esc_attr( $id ) . '"' : ''; $class = ( $class != '' ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf'; $style = ( $style != '' ) ? 'style="' . $style . '"' : ''; $type = ( $type == 'portfolio' ) ? 'x-portfolio' : 'post'; $count = ( $count != '' ) ? $count : 3; $category = ( $category != '' ) ? $category : ''; $category_type = ( $type == 'post' ) ? 'category_name' : 'portfolio-category'; $offset = ( $offset != '' ) ? $offset : 0; $orientation = ( $orientation != '' ) ? ' ' . $orientation : ' horizontal'; $no_image = ( $no_image == 'true' ) ? $no_image : ''; $fade = ( $fade == 'true' ) ? $fade : 'false'; $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} data-fade=\"{$fade}\">"; $q = new WP_Query( array( 'orderby' => 'date', 'post_type' => "{$type}", 'posts_per_page' => "{$count}", 'offset' => "{$offset}", "{$category_type}" => "{$category}" ) ); if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); if ( $no_image == 'true' ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image_output = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . x_get_option( 'x_stack', 'integrity' ) . '-cropped', NULL ) . '</div>'; $image_output_class = 'with-image'; } $output .= '<a href="' . get_permalink( get_the_ID() ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . '<div class="entry-wrap">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>' . do_shortcode('[gap size="10px"]') . '<p>' . excerpt(25) . '</p>' . '<span class="x-recent-posts-date">' . get_the_date() . ', by ' . get_the_author() . '</span>' . '</div>' . '</div>' . '</article>' . '</a>'; endwhile; endif; wp_reset_postdata(); $output .= '</div>'; return $output; } add_filter('init', 'custom_recents_posts'); function custom_recents_posts() { remove_shortcode( 'recent_posts' ); add_shortcode( 'recent_posts', 'x_shortcode_recent_posts2' ); } add_action('admin_head', 'my_custom_style'); function my_custom_style() { echo '<style> li.toplevel_page_x-addons-home{ display:none } </style>'; } ?>July 12, 2016 at 7:15 am #1082988
ChristopherModeratorHi there,
Your site is displaying fine. Please provide us with more information about the issue.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1082687 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
