• Resolved JakenCD

    (@vansite)


    Hi guys,

    For some reasons today my homepage is not showing. I’d just installed a plugin that I have already deactivated but the homepage is not showing anyways. I don’t know if I have some cache that doesn’t allow me to watch the homepage again (I’ve cleared it)

    https://dreamglish.com

    thanks

Viewing 15 replies - 31 through 45 (of 61 total)
  • Thread Starter JakenCD

    (@vansite)

    4377 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4373 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4375 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4377 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4373 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4375 Notice: Trying to get property of non-object in /home/sites/dreamglish.com/public_html/wp-includes/query.php on line 4377
    Back Home
    Inicio
    Nuestros Centros
    Presupuesto
    Blog
    Contacta

    Fatal error: Unsupported operand types in /home/sites/dreamglish.com/public_html/wp-content/themes/customizr-child/functions.php on line 293

    Thread Starter JakenCD

    (@vansite)

    I’m copying the errors here but it’s not being displayed… hehe

    Thread Starter JakenCD

    (@vansite)

    Thread Starter JakenCD

    (@vansite)

    Ok, finally I got something

    all these notices disappear when I deactivate the plugin WP Hide Post

    the last line of issues remains though
    Fatal error: Unsupported operand types in /home/sites/dreamglish.com/public_html/wp-content/themes/customizr-child/functions.php on line 293

    Theme Author presscustomizr

    (@nikeo)

    there you go ! this is your problem ??

    Thread Starter JakenCD

    (@vansite)

    but this code has been there for a while.

    Rocco helped me set a specific action in my slider and it has worked for some weeks.

    He will probably be back in a while and maybe he can help me to fix it. In the worst case scenario I will have to delete this action. I hope we can fix it

    Thread Starter JakenCD

    (@vansite)

    I have to admit that I have learnt more today than in the last 10 years, hehe

    Theme Author presscustomizr

    (@nikeo)

    For the moment, I would suggest to comment this code before it is fixed.

    ?? : nothing is better than making mistakes to learn code!

    Thread Starter JakenCD

    (@vansite)

    this is what I did, and the slider is not displayed anymore, but the website is on again

    https://dreamglish.com

    if you don’t mind me asking, how do you get those lightboxes/fancyboxes (Canada, New Zealand, USA)?

    Hello, can you share your child-theme functions.php so we can see what’s the evil line?

    Thread Starter JakenCD

    (@vansite)

    of course I can Rocco. Do you have an email? or do you prefer here. But here it doesn’t let me share a big amount of code.

    ibogo, for that effect I used a photo and and a div (hidden first) and then in the hover i make it visible. I can give you the code if you want. just send me an email at [email protected]. Anyways, right now, you are missing the best part, that is the slider created by Rocco (d4z_c0nf) that displays the blog in the main slider

    thank you

    Hello,
    you can use pastebin.com ??

    Thread Starter JakenCD

    (@vansite)

    <?php

    //canviar credits

    add_filter(‘tc_credits_display’, ‘my_custom_credits’);
    function my_custom_credits(){
    $credits = ‘All rights reserved’;
    $newline_credits = ”;
    return ‘
    <div class=”span4 credits”>
    <p> · © ‘.esc_attr( date( ‘Y’ ) ).’ ‘.esc_attr(get_bloginfo()).’ · ‘.($credits ? $credits : ‘Designed by Themes & Co‘).’ ·’.($newline_credits ? ‘
    · ‘.$newline_credits.’ ·’ : ”).'</p> </div>’;
    }

    //post — slider

    /* Works with Customizr > 3.3.12 and Customizr-Pro > 1.0.17 */
    add_filter(‘tc_core’, ‘use_custom_slider_class’);
    function use_custom_slider_class($classes){
    //don’t instantiate default class
    unset( $classes[‘content’][
    array_search(array(‘inc/parts’,’slider’), $classes[‘content’])
    ]
    );
    //instantiate our class
    new TC_Slider_mod;
    return $classes;
    }
    add_filter(‘tc_slider_name_id’, ‘my_slider_of_posts’);
    function my_slider_of_posts( $slider_name_id ){
    if ( $slider_name_id == ‘front-slider’ )
    return array(
    ‘slider’ => ‘front-slider’,
    ‘query’ => array(
    ‘tag’ => “front-slider”,
    ‘posts_per_page’ => 5,
    ‘order’ => ‘desc’
    ),
    );
    return $slider_name_id;
    }

    if ( ! defined(‘CUSTOMIZR’) )
    define(‘CUSTOMIZR’, get_template_directory() );

    require_once( CUSTOMIZR . ‘/inc/parts/class-content-slider.php’);
    class TC_Slider_mod extends TC_slider{
    private $saved_slides;
    private $slider_name_id = false;
    private $layout_value;
    private $img_size;
    private $layout_class;

    //override tc_set_slider_hooks()
    function tc_set_slider_hooks() {
    //gets the actual page id if we are displaying the posts page
    $queried_id = $this -> tc_get_real_id();

    $slider_name_id = apply_filters(‘tc_slider_name_id’, $this ->tc_get_current_slider($queried_id) );

    if ( ! is_array( $slider_name_id ) )
    return parent::tc_set_slider_hooks();

    extract($slider_name_id);
    $all_sliders = TC_utils::$inst -> tc_opt( ‘tc_sliders’);
    $saved_slides = ( isset($all_sliders[$slider]) ) ? $all_sliders[$slider] : false;

    //if the slider not longer exists or exists but is empty, return false
    if ( !isset($saved_slides) || ! is_array($saved_slides) || empty($saved_slides) )
    return;

    add_action( ‘__after_header’ , array( $this , ‘tc_slider_display’ ) );
    add_action( ‘__after_carousel_inner’ , array( $this , ‘tc_slider_control_view’ ) );
    //adds the center-slides-enabled css class
    add_filter( ‘tc_carousel_inner_classes’, array( $this, ‘tc_set_inner_class’) );

    $this -> tc_slider_mod_set_properties( $saved_slides, $slider_name_id, $queried_id );
    }

    private function tc_get_current_slider($queried_id) {
    //gets the current slider id
    $_home_slider = TC_utils::$inst->tc_opt( ‘tc_front_slider’ );
    $slider_name_id = ( tc__f(‘__is_home’) && $_home_slider ) ? $_home_slider : esc_attr( get_post_meta( $queried_id, $key = ‘post_slider_key’ , $single = true ) );
    return apply_filters( ‘tc_slider_name_id’, $slider_name_id , $queried_id);
    }

    private function tc_get_real_id() {

    global $wp_query;
    $queried_id = get_queried_object_id();
    return ( ! tc__f(‘__is_home’) && $wp_query -> is_posts_page && ! empty($queried_id) ) ? $queried_id : get_the_ID();

    }

    function tc_slider_mod_set_properties( $saved_slides, $slider_name_id, $queried_id ){

    $this -> saved_slides = $saved_slides;
    $this -> slider_name_id = $slider_name_id;
    //gets slider options if any
    $layout_value = tc__f(‘__is_home’) ? TC_utils::$inst->tc_opt( ‘tc_slider_width’ ) : esc_attr(get_post_meta( $queried_id, $key = ‘slider_layout_key’ , $single = true ));

    $this -> layout_value = apply_filters( ‘tc_slider_layout’, $layout_value, $queried_id );

    //declares the layout vars
    $this -> layout_class = implode( ” ” , apply_filters( ‘tc_slider_layout_class’ , ( 0 == $layout_value ) ? array(‘container’, ‘carousel’, ‘slide’) : array(‘carousel’, ‘slide’) ) );

    $this -> img_size = apply_filters( ‘tc_slider_img_size’ , ( 0 == $layout_value ) ? ‘slider’ : ‘slider-full’);

    }

    //override tc_slider_display
    function tc_slider_display() {
    if ( ! $this -> slider_name_id )
    return parent::tc_slider_display();

    $slider_name_id = $this -> slider_name_id;
    $img_size = $this -> img_size;
    $saved_slides = $this -> saved_slides;
    $layout_class = $this -> layout_class;

    $slides = $this -> tc_get_posts_slides( $slider_name_id, $img_size, $saved_slides );
    //returns nothing if no slides to display
    if ( ! isset($slides) || ! $slides )
    return;

    extract($slides);
    //define carousel inner classes
    $_inner_classes = implode( ‘ ‘ , apply_filters( ‘tc_carousel_inner_classes’ , array( ‘carousel-inner’ ) ) );
    ob_start();
    ?>
    <div id=”customizr-slider” class=”<?php echo $layout_class ?> “>
    <?php if ( 1 == esc_attr( TC_utils::$inst->tc_opt( ‘tc_display_slide_loader’) ) && apply_filters( ‘tc_display_slider_loader’ , true ) ): ?>
    <div class=”tc-slider-loader-wrapper”>
    <div class=”tc-img-gif-loader”>
    <img data-no-retina src=”<?php echo apply_filters(‘tc_slider_loader_src’ , sprintf( ‘%1$s/%2$s’ , TC_BASE_URL , ‘inc/assets/img/slider-loader.gif’) ) ?>”>
    </div>
    </div>
    <?php endif; ?>
    <?php do_action( ‘__before_carousel_inner’ , $slides ) ?>
    <div class=”<?php echo $_inner_classes?>”>
    <?php
    foreach ($slides as $id => $data)
    $this -> tc_render_single_slide_view( $id, $data , $slider_name_id, $img_size );
    ?>
    </div><!– /.carousel-inner –>
    <?php do_action( ‘__after_carousel_inner’ , $slides ) ?>
    </div><!– /#customizr-slider –>
    <?php
    $html = ob_get_contents();
    if ($html) ob_end_clean();
    echo apply_filters( ‘tc_slider_display’, $html, $slider_name_id );
    }

    function tc_get_posts_slides( $slider_name_id, $img_size, $saved_slides){
    extract($slider_name_id);
    global $wp_query, $wp_the_query, $post;
    $wp_query = new WP_Query($query);

    // if you don’t want to show the first attachment when featured image isn’t set
    // remove the line below
    add_filter(‘tc_show_single_post_content’, ‘__return_false’);

    // remove smart load if any
    $smart_load_enabled = method_exists(‘TC_utils’, ‘tc_parse_imgs’) && method_exists(‘TC_utils’, ‘tc_opt’) && esc_attr( TC_utils::$inst->tc_opt( ‘tc_img_smart_load’ ) );
    if ( $smart_load_enabled )
    remove_filter(‘tc_thumb_html’, array(TC_utils::$instance, ‘tc_parse_imgs’));

    // build our array of slides

    //initialize the slides array
    $slides = array();

    //init slide active state index
    $__loop_index = 0;
    while ( have_posts() ){
    the_post();

    //title
    $title = $post->post_title;
    $default_title_length = apply_filters( ‘tc_slide_title_length’, 80 );
    $title = ( strlen($title) > $default_title_length ) ? substr( $title,0,strpos( $title, ‘ ‘ , $default_title_length) ). ‘ …’ : $title;
    //lead text
    $text = get_the_excerpt();
    $default_text_length = apply_filters( ‘tc_slide_text_length’, 250 );
    $text = ( strlen($text) > $default_text_length ) ? substr( $text,0,strpos( $text, ‘ ‘ ,$default_text_length) ). ‘ …’ : $text;

    //button text
    $button_text = __(‘Read more »’, ‘customizr’);
    $default_button_length = apply_filters( ‘tc_slide_button_length’, 80 );
    $button_text = ( strlen($button_text) > $default_button_length ) ? substr( $button_text,0,strpos( $button_text, ‘ ‘ ,$default_button_length)). ‘ …’ : $button_text;

    //link post id
    $link_id = get_the_id();

    $id = $link_id;
    //button link
    $link_url = $link_id ? get_permalink( $link_id ) : ‘javascript:void(0)’;

    //sets the first slide active
    $active = ( 0 == $__loop_index ) ? ‘active’ : ”;

    $color_style = ”;

    //attachment image
    $alt = apply_filters( ‘tc_slide_background_alt’ , trim(strip_tags( get_the_title() ) ) );
    $slide_background = $this -> tc_get_thumbnail_data($img_size, $alt);
    //adds all values to the slide array only if the content exists (=> handle the case when an attachment has been deleted for example). Otherwise apply a default slide
    if ( empty($slide_background) && isset($saved_slides[1]) )
    $slide_background = wp_get_attachment_image( $saved_slides[1], $img_size, false, array( ‘class’ => ‘slide’ , ‘alt’ => $alt ) );

    $slides[$id] = array(
    ‘title’ => $title,
    ‘text’ => $text,
    ‘button_text’ => $button_text,
    ‘link_id’ => $link_id,
    ‘link_url’ => $link_url,
    ‘active’ => $active,
    ‘color_style’ => $color_style,
    ‘slide_background’ => $slide_background,
    );

    //increments active index
    $__loop_index++;
    }//end of slides loop

    $slides = apply_filters(‘tc_post_slides’, ( !empty($slides) ) ? $slides : false, $img_size);
    // if you chose to not show the first attachment when featured image isn’t set
    // remove the line below
    remove_filter(‘tc_show_single_post_content’, ‘__return_false’);

    // re-add smart load if removed
    if ( $smart_load_enabled )
    add_filter(‘tc_thumb_html’, array(TC_utils::$instance, ‘tc_parse_imgs’));

    $wp_query = $wp_the_query;

    //returns the slides or false if nothing
    return $slides;
    }// end pf tc_get_the_slides

    function tc_get_thumbnail_data($img_size, $alt){
    $attachment_id = get_post_meta( get_the_ID(), ‘slide_img’);
    if ( $attachment_id )
    return wp_get_attachment_image( $attachment_id[0], $img_size, false, array(‘class’ => ‘slide’ , ‘alt’ => $alt) );
    $thumb = TC_post_thumbnails::$instance -> tc_get_thumbnail_model($img_size);
    $thumb = isset($thumb) && isset($thumb[‘tc_thumb’]) ? $thumb[‘tc_thumb’] : null;
    return $thumb;
    }
    }

    // second slider snippet

    add_filter(‘tc_post_slides’, ‘add_custom_slides’, 10, 2);
    function add_custom_slides( $slides, $img_size){
    /*
    * set this as an empty array if you don’t want slides before this way:
    * $my_slides_before = array();
    */
    $my_slides_before = array(
    ‘my_479_of_your_attachment’ => array( // replace my_316 with my_ID_of_your_attachment
    ‘title’ => ‘Te asesoramos sin coste’,
    ‘text’ => ‘Dreamglish te asesorará sin coste alguno. Desde la carta de aceptación de la escuela hasta el pago final.’,
    ‘button_text’ => ‘Lee más’,
    ‘link_id’ => ‘some link’,
    ‘link_url’ => ‘https://dreamglish.com/modelo-de-negocio/&#8217;,
    ‘active’ => ‘active’,
    ‘color_style’ => ”,
    ‘slide_background’ => wp_get_attachment_image( 479, $img_size, false, array( ‘class’ => ‘slide’, ‘alt’ => ‘First Slide’) ), /* Replace 316 with the id of your desired attachment and the alt ‘First Slide’ */

    )
    );

    // same thing with slides after:

    /*
    * set this as an empty array if you don’t want slides after this way:
    * $my_slides_after = array();
    */

    $my_slides_after = array();

    /* reset the active post slide if we have to add slides before */
    if ( ! empty( $my_slides_before ) && $slides ) {
    $keys = array_keys($slides);
    $first_slide_key = $keys[0];

    $slides[ $first_slide_key ][‘active’] = false; //reset active
    }

    //$slides = $my_slides_before + $slides + $my_slides_after;
    return $slides;
    }

    /*llargada text slider*/

    add_filter( ‘tc_slide_title_length’, ‘my_slider_text_limits’ );
    add_filter( ‘tc_slide_text_length’, ‘my_slider_text_limits’ );
    add_filter( ‘tc_slide_button_length’, ‘my_slider_text_limits’ );
    function my_slider_text_limits() {
    switch ( current_filter() ) {
    case ‘tc_slide_title_length’:
    return 150;
    break;

    case ‘tc_slide_text_length’:
    return 100;
    break;

    case ‘tc_slide_button_length’:
    return 150;
    break;
    }
    }

    /* full width */

    add_filter(‘tc_fp_widget_area’, ‘use_row_fluid’);
    add_filter(‘tc_footer_widget_area’, ‘use_row_fluid’);
    add_filter(‘tc_column_content_wrapper_classes’, ‘use_row_fluid’);

    function use_row_fluid($classes){
    return str_replace(‘row’, ‘row-fluid’, $classes);
    }

    /* end full width */

Viewing 15 replies - 31 through 45 (of 61 total)
  • The topic ‘Home page not showing’ is closed to new replies.