Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • in reply to: Header background image per category, body class outputs #174396
     Patagonia
    Participant

    PS: I wasn’t sure how to call the category as body class output, but did try two variations to get the top-parent ID. I added these variations to the theme’s functions.php

    COPY CODE
    /* Get the Page Slug to Use as a Body Class, this will only return a value on pages! */
    $class = '';
    /* is it a page */
    if( is_page() ) { 
    	global $post;
            /* Get an array of Ancestors and Parents if they exist */
    	$parents = get_post_ancestors( $post->ID );
            /* Get the top Level page->ID count base 1, array base 0 so -1 */ 
    	$id = ($parents) ? $parents[count($parents)-1]: $post->ID;
    	/* Get the parent and set the $class with the page slug (post_name) */
            $parent = get_post( $id );
    	$class = $parent->post_name;
    }
    

    (from WordPress codex, this didn’t work)

    And I tried

    COPY CODE
    add_filter( 'body_class', 'dc_parent_body_class' );
    function dc_parent_body_class( $classes ) {
        	if( is_page() ) { 
            	$parents = get_post_ancestors( get_the_ID() );
    			$id = ($parents) ? $parents[count($parents)-1]: get_the_ID();
    		if ($id) {
    			$classes[] = 'top-parent-' . $id;
    		} else {
    			$classes[] = 'top-parent-' . get_the_ID();
    		}
    	}
     
    	return $classes;
    }
    

    Which also did not work. Neither did add the top-parent ID, not sure why not as your code does output all kinds of body classes?

    in reply to: Issues With Kleo theme after Update #63297
     Patagonia
    Participant

    I am getting different errors when updating to 3.01 on Xampp/localhost:

    COPY CODE
    Updating Theme Kleo (1/1)
    
    Downloading update from https://s3.amazonaws.com/marketplace-downloads.envato.com/files/137970596/kleo.zip?AWSAccessKeyId=AKIAJYG5ROGJ6X7Z3M6Q&Expires=1434488463&Signature=0P%2FF1vK9pngNA%2Fv1Yn2wBZjEum0%3D&response-content-disposition=attachment%3B+filename%3Dthemeforest-6776630-kleo-next-level-wordpress-theme-wordpress_theme.zip…
    
    Warning: touch(): Unable to create file C:\Users\Harry\AppData\Local\Temp/kleo.zipAWSAccessKeyIdAKIAJYG5ROGJ6X7Z3M6QExpires1434488463Signature0P%2FF1vK9pngNA%2Fv1Yn2wBZjEum0%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-6776630-kleo-next-level-wordpress-theme-wordpress_theme.tmp because Invalid argument in E:\XAMPP\htdocs\site\wp-admin\includes\file.php on line 164
    
    Warning: unlink(C:\Users\me\AppData\Local\Temp/kleo.zipAWSAccessKeyIdAKWIAJG5ROGJ6X7Z3M6QExpires1434488463Signature0P#3FF1vKartgNA%2Fv1Yn2wBZjEum0%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-6776630-kleo-next-level-wordpress-theme-wordpress_theme.tmp): Invalid argument in E:\XAMPP\htdocs\site\wp-admin\includes\file.php on line 464
    
    An error occurred while updating Kleo: Download failed. Could not open handle for fopen() to C:\Users\me\AppData\Local\Temp/kleo.zipAWSAccessKeyIDAKWIAJG5ROGJ6X7Z3M6QExpires1434488463Signature0P#3FF1vKartgNA%2Fv1Yn2wBZjEum0%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-6776630-kleo-next-level-wordpress-theme-wordpress_theme.tmp
    
    Disabling Maintenance mode…

    I have fopen ‘on’ in php.ini.

    Cheers, Harry

    in reply to: Where are uploaded image sized defined? #24798
     Patagonia
    Participant

    I noticed that the problem lies in this part of kleo/functions.php:

    COPY CODE
    	/* This theme uses a custom image size for featured images, displayed on "standard" posts. */
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 672, 9999 ); // Unlimited height, soft crop 
    	add_image_size( 'kleo-full-width', 1038, 583 );
    

    If I change the last line to 900,999, then the 900pxx version is used.

    Of course I should not edit the Kleo/functions.php, can I just add the above function to the child’s functions.php? Or just the last line?

    Thanks

     Patagonia
    Participant

    See also the updated faq: http://wordpress.org/plugins/nav-menu-roles/faq/
    KLeo team, it states:

    Workaround #1

    Shazdeh, the author of Menu Item Visibility Control plugin had the genius idea to not wait for a core hook and simply add the hook ourselves. If all plugin and theme authors use the same hook, we can make our plugins play together.

    Therefore, as of version 1.6 I am modifying my admin walker to only adding the following line (right after the description input):

    COPY CODE
    <?php 
    // This is the added section
    do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
    // end added section 
    ?>
    

    I am then adding my fields to this hook. Ask your conflicting plugin/theme’s author to do the same and our plugins should become compatible.

    So some work on your side might be needed.

    in reply to: Edit Post-Meta and functions vs theme-functions #18694
     Patagonia
    Participant

    I solved 1) with a combination of function and CSS, not sure if this is optimal, but seems to work:

    – To hide the time (the time will still pop-up as alt text when hovering over the date):
    Add to child theme Style.Css:

    COPY CODE
    article .article-meta .post-meta a.post-time:after {
      content: none;

    To remove author, I added the entire function to child theme functions.php and deleted the author part:

    COPY CODE
    	function kleo_entry_meta($echo=true, $att=array()) {
    	
    		$meta_list = array();
    		
    		// Translators: used between list items, there is a space after the comma.
    		$categories_list = get_the_category_list( __( ', ', 'kleo_framework' ) );
    
    		// Translators: used between list items, there is a space after the comma.
    		$tag_list = get_the_tag_list( '', __( ', ', 'kleo_framework' ) );
    
    		$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark" class="post-time"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    			esc_url( get_permalink() ),
    			esc_attr( get_the_time() ),
    			esc_attr( get_the_date( 'c' ) ),
    			esc_html( get_the_date() )
    		);
    
    		$meta_list[] = '<small>'.$date.'</small>';
    
    		
    		$cat_tag = array();
    		
    		if ( $categories_list ) {
    			$cat_tag[] = $categories_list;
    		}
    		
    		if ($tag_list) {
    			$cat_tag[] = $tag_list;
    		}
    		if (!empty($cat_tag)) {
    			$meta_list[] = '<small class="meta-category">'.implode(", ",$cat_tag).'</small>';
    		}
    		
    		//comments
    		if (!isset($att['comments']) || (isset($att['comments']) && $att['comments'] !== false)) {
    		$meta_list[] = '<small class="meta-comment-count"><a href="'. get_permalink().'#comments"> '.get_comments_number().' <i class="icon-chat-1 hover-tip" 
    			data-original-title="'.sprintf( _n( 'This article has one comment', 'This article has %1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'" 
    			data-toggle="tooltip" 
    			data-placement="top"></i></a></small>';
    		}
    		
    		if ($echo) {
    			echo implode(", ", $meta_list);
    		}
    		else {
    			return implode(", ", $meta_list);
    		}
    		
    	}

    And made a lot of CSS and template changes as well.

    Still it would be a bit more userfriendly to have the option in the backend about which meta parts (not) to show.

    I would appreciate advice re question #2 above.

    Thanks!

    in reply to: Bg-body.gif slowing down page loads #18270
     Patagonia
    Participant

    I noticed the same and added the following to the child’s theme CSS:

    COPY CODE
    body {
    	background-image: none !important;
        background-repeat: no-repeat;
    }

    This overrides the CSS calling it, so the next theme update won’t replace it on the site.

    I don’t see any difference, not sure why the file is called?
    Cheers

     Patagonia
    Participant

    Thanks Sharmstr, much appreciated.

    I only tried the sidebars within the page to solve the 3-columns problem which I discussed here:
    https://archived.seventhqueen.com/forums/topic/how-to-use-custom-sidebars-for-3-column-pages

    A solution suggested was to use a fullwidth template and add 2 sidebars.
    I just tried it again on a new page, full width template and VC (now 4.1.2) added:

    COPY CODE
    
    [vc_row][vc_column width="1/4"][vc_widget_sidebar sidebar_id="sidebar-1"][/vc_column][vc_column width="1/2"][vc_column_text css_animation="right-to-left"]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column][vc_column width="1/4"][vc_widget_sidebar sidebar_id="sidebar-1"][/vc_column][/vc_row]
    

    See attached screenshot, page title still outside, both sidebars still have padding.

    One added bug: the standard vertical lines/dividers are gone.

    I cannot set padding global as these sidebars will also be used a regular sidebars (in 2 columns templates). I also do not want to add custom CSS to every 3-column page to get everything lined up correctly (and to have the vertical dividers?).

    Attachments:
    You must be logged in to view attached files.
     Patagonia
    Participant

    Thanks Sharmstr,

    this is what I have:

    COPY CODE
    
    [vc_row inner_container="yes" text_align="center" section_type="main" bg_position="top" bg_position_horizontal="left" bg_repeat="no-repeat" bg_cover="true" bg_attachment="false" parallax_speed="0.1" padding_top="40" padding_bottom="40" min_height="0" border="bottom" css_animation="right-to-left"][vc_column width="1/4"][vc_widget_sidebar sidebar_id="sidebar-1"][kleo_button title="Text on the button" style="default" tooltip_position="left" tooltip_action="hover" icon="attention-alt"][/vc_column][vc_column width="1/2"][vc_column_text css_animation="right-to-left"]
    
    I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
    
    [/vc_column_text][kleo_animate_numbers animation="animate-when-almost-visible" timer="14000"]7777[/kleo_animate_numbers][/vc_column][vc_column width="1/4"][kleo_animate_numbers animation="animate-when-visible" timer="1400"]7777[/kleo_animate_numbers][/vc_column][/vc_row][vc_row inner_container="no" section_type="alternate" bg_position="center" bg_position_horizontal="center" bg_repeat="no-repeat" bg_cover="false" bg_attachment="true" parallax_speed="0.2" padding_top="10" padding_bottom="10" min_height="0" border="bottom" animation="animate-when-almost-visible" css_animation="right-to-left" text_align="center" type="image" bg_image="81" enable_parallax="false"][vc_column width="1/1"][kleo_divider type="full" position="center" icon="angle-up" icon_size="large" text="inside divide text"][/vc_column][/vc_row][vc_row inner_container="yes" section_type="main" bg_position="top" bg_position_horizontal="left" bg_repeat="no-repeat" bg_cover="true" bg_attachment="false" parallax_speed="0.1" padding_top="40" padding_bottom="40" min_height="0" border="bottom" css_animation="right-to-left"][vc_column width="1/4"][kleo_icon icon="camera-alt" icon_size="4x" tooltip_position="left" tooltip_action="hover"][/vc_column][vc_column width="1/4"][vc_column_text css_animation="right-to-left"]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column][vc_column width="1/4"][vc_single_image image="50" border_color="grey" img_link_target="_self" css_animation="right-to-left"][/vc_column][vc_column width="1/4"][kleo_icon icon="camera" icon_size="4x" tooltip_position="left" tooltip_action="hover"][/vc_column][/vc_row][vc_row inner_container="no" text_align="center" section_type="alternate" type="color" bg_color="#8c8c8c" bg_position="top" bg_position_horizontal="left" bg_repeat="no-repeat" bg_cover="true" bg_attachment="false" parallax_speed="0.1" padding_top="4" padding_bottom="4" min_height="0" border="all" animation="animate-when-almost-visible" css_animation="top-to-bottom"][vc_column width="1/1"][vc_message color="alert-info" style="rounded" css_animation="right-to-left"]I am message box. Click edit button to change this text.[/vc_message][/vc_column][/vc_row][vc_row inner_container="no" text_align="center" section_type="alternate" bg_position="top" bg_position_horizontal="left" bg_repeat="no-repeat" bg_cover="true" bg_attachment="false" parallax_speed="0.1" padding_top="4" padding_bottom="4" min_height="0" border="bottom" animation="animate-when-visible" css_animation="el-fade"][vc_column width="1/1"][kleo_divider type="double" double="Yes" position="center" icon="anchor"][/vc_column][/vc_row][vc_row][vc_column width="1/1"][kleo_visibility type="visible-lg"][vc_gmaps][/kleo_visibility][/vc_column][/vc_row]

    (remove the < code > tags at the beginning/end).
    Note that it is just a bunch of tests, but just in case it would influence the issues, I have included all the VC page code. Thanks for checking!

    Cheers

Viewing 8 posts - 1 through 8 (of 8 total)

Log in with your credentials

Forgot your details?