Forum Replies Created

Viewing 15 replies - 31 through 45 (of 681 total)
  • 1. Remove all menu related custom CSS.
    2. Inspect the page and pick your line breaking element (let’s assume it is li#menu-item-596)
    3. Add clear:left to it for browser widths above 979px:

    @media (min-width: 980px) {
    	li#menu-item-596 { clear: left; }
    }

    Edit: I wasn’t paying attention to the request. The above code turns the menu into two rows, not two columns.

    It can be adjusted to turn it into two columns, but why would you want that, lol?

    Here’s how:

    @media (min-width: 980px) {
    	#menu-basic-menu > li:nth-child(2n+1) {
    		clear: left;
    		min-width: 150px;
    	}
    }

    Adjust min-width to be greater than your widest element from left column if you want right elements to be all aligned and also to adjust the distance between columns.

    I suppose you have used a plugin that adds sharing buttons to every post and page. Perhaps “Simple Social Buttons”?

    Maybe you should ask for support from them if the controls they provide do not work?

    All you need to change at the snippet you used above is where to add the widget area. That is controlled by:

    add_action ('__after_header', 'add_my_widget_area', 0);

    So, you need to remove/disable that add_action first, but leave all the rest of the snippet in place. Now we’re going to filter the output of the slider and add the result of a custom function add_my_widget_area to it.

    add_filter('tc_display_slider', 'add_widget_to_slider');
    	// we're capturing the output of tc_display_filter function
    	// and apply the function add_widget_to_slider to it.

    Now let’s write the function:

    function add_widget_to_slider($contents){
    	return $contents.add_my_widget_area();
    	// we're returning $contents unchanged + the result of
    	// add_my_widget_area function (already defined in the snippet)
    }

    All the code from above goes into functions.php, where you already placed the snippet. Don’t forget to disable (prefix with //) the initial add_action. Also, you don’t need the comments (what is after the // signs). I just put them to help you understand the code.

    For centering the contents of the widget area I’ll need to look at your page first to give you the best solution. We’re gonna do that through use of CSS.

    To answer your where is custom CSS question:
    In Customizr you can add CSS easily with two methods:
    1. Go to Dashboard > Appearance > Customize and find the Custom CSS section. Put your code in and save.
    2. Make a child theme for Customizr (the child theme is a place where you can make modifications to the parent theme without the fear of them being lost on parent theme update). You can find out how on Customizr website, in the guide. Once created, open style.css of your child theme and put your code at the end of the file. Upload and you’re done.

    I am not a big fan of proving people wrong, but I think you have the skill to write a custom css. You just don’t have the knowledge. The principle is very simple: instead of putting style=”/* some css here */” you only put class=”put-a-class-name-here”.

    Than you open style.css and you write at the end:

    .put-a-class-name-here {
    	/* some css here */
    }

    Now, my wild guess is that you are using Visual editor when you are editing your pages and posts. I strongly advice you not to, as you do not see the html tags and you have very limited control over them. Use the Text tab you will see all tags. For example, this is a piece of your page code:

    <p class="font_8" style="color: #ffffff;"><span style="color: #000000;"><span style="font-weight: bold;"><span class="color_5">BICCHIERE:</span></span>?Balloon?</span></p>

    The code above says:

    <paragraph>
    	<make this white and class "font_8">
    		<make this black>
    			<make this bold>
    				<this has class of "color_5">
    					BICCHIERE:
    				<no more class of "color5">
    			</no more bold>
    			Balloon
    		<no more black>
    	<no more white and class "font_8">
    <end of paragraph>

    Normally, it should only be:

    <paragraph>
    	<this has class of "color_5">
    		BICCHIERE:
    	<no more class of "color_5">
    	Balloon
    <end of paragraph>

    Translated in html:

    <p><span class="color_5">BICCHIERE:</span> Balloon</p>

    And, in your style.css:

    .color_5 {
    	font-weight: bold; /* make it bold */
    	color: #000000; /* make it black */
    }

    Now, every element that has the class of color_5 will be black and bold, unless some stronger CSS rules apply to it, overriding font-weight or color.

    These are the basics of CSS. The rest is here.

    Good luck ??

    I just tested your site on mobile and I see the menu problem.

    I don’t want to go and mod whatever you are using to generate the menu. I’d rather disable my CSS rule on mobile devices instead. However, I don’t have inspect tools on mobile so I can’t see if there’s any special class added to the body when the website is viewed on mobile devices.
    But we can always add a custom class. In functions.php:

    add_filter('body_class','add_custom_mobile_class');
    function add_custom_mobile_class($classes) {
    	if (wp_is_mobile()) $classes[] = 'this-is-mobile';
    	return $classes;
    }

    Take note of this warning about wp_is_mobile() conditional:

    You should realize that this does not detect a mobile phone specifically, as a tablet is considered a mobile device. Check the Plugins area for several helpful alternatives.

    Now the body element has this-is-mobile class when viewed on mobile devices and we can use this to only apply our rule if body does not have our class:

    body:not(.this-is-mobile) {overflow-x: hidden;}

    One more thing, you need to add this to your CSS aswell, I forgot to also change the “.current-menu-item > a” and “.current-menu-ancestor > a” css and it now shows up white (from the default menu css):

    .dropdown-menu > li.current-menu-item > a,
    .dropdown-menu > li.current-menu-ancestor > a {
    	background: transparent;
    	}

    From what I see, the yellow texts color is added inline, and that is wrong. For example, in https://birragladium.altervista.org/symphony/, at the bottom, you have

    <span style="font-weight: bold;"><span class="color_5" style="color: #ffcb05;">Temp. di Serv. 10 °C</span></span>

    That styling is directly editable from the page/post contents but is not not advisable. You should remove all inline styling and rely on CSS to style your contents via classes. For example, normally the text above should be changed to

    <span class="color_5"><strong>Temp. di Serv. 10 °C</strong></span>

    And now you have control over it from style.css, using:

    .color_5 { color: #968F6F; }

    If all your color_5 spans are bold, you can remove the <strong> tag and just add “font-weight: bold;” to the CSS and it will apply to all the spans with a class of color_5.

    In order to change the footer background color, you need to go into your footer.php (I assume) or wherever you added that <center> tag that holds your footer text. You either add a class to it (<center class="footer-class"> and than you have control over it from style.css, with

    .footer-class { background-color: #212121; }

    or you can just add the style inline: <center style="background-color: #212121;"> (not recommended, because it is harder to modify. If you add classes, you can change all the styles of your website from a single place: style.css). Besides, it will change the style for every place where you have that class, but if you add style inline you need to go in every place and change them. Not having to do that is why CSS was invented :).

    @dangerousdolly: The auto-excerpts function only applies to the posts that do not have defined excerpts. Wherever excerpts are defined, they are displayed in full length. So, if you place the entire contents of the post in the excerpt field and save, that particular post will be displayed full, if your theme is set to display excerpts.

    There are many quite complicated aspects here both technical and from the layout’s point of view. One would be comment pagination for posts that have a lot of comments. Another would be the integration of existing comments and comment forms in a responsive manner that would go well with the existing layout, considering some posts will have comments, other will not.

    Another point worth mentioning is that, from Google’s point of view, you are eliminating a step from the interaction chain for users that comment on your posts which, in the long run, will hurt your Google pagerank.

    So, do you think it’s worth the trouble?

    You can always add the function in functions.php of Customizr, but you can bet it will vanish upon theme update. That’s the whole point of making a child theme.

    But if you add that function in the parent themes’ functions.php and never update it, it will work.

    In WordPress, functions.php of the current theme is where you want to place your custom php and style.css of the current theme is where you want to add your custom css.

    @ line 14 you are exiting php mode and re-entering it on line 16. You are doing so between functions, sending two empty lines.

    Do not exit php mode outside functions! Here’s the corrected code:

    <?php
    /**
    * This is where you can copy and paste your functions !
    */
    
    add_filter('tc_colophon_right_block', 'my_image');
    function my_image(){
    	$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
    	$width = '250px'; /* change these values */
    	$height = '79px'; /* ^ */
    	$img = '<img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right">';
    	return '<div class="span4 right-image">'.$img.'</div>';
    	}
    
    add_filter( 'tc_credits_display', 'my_credits_display' );
    function my_credits_display($html) {
    	$logo_src = esc_url ( tc__f( '__get_option' , 'tc_logo_upload') ) ;
    	if ( empty($logo_src) ) return $html; ?>
    
    	<div class="span4 credits"><?php
    	$credits = sprintf( '<p> · ? %1$s · Shades of Happiness·</p>', esc_attr( date( 'Y' ) ),
    		esc_url( home_url() ),
    		esc_attr(get_bloginfo()),
    		'<img src="'.$logo_src.'" alt="'.esc_attr(get_bloginfo()).'">',
    		'Hunter Douglas'
    		);
    	echo $credits; ?>
    	</div> <?php
    	}

    Please note that the WP forum parser might have changed some middots into actual middots in your code. You should try to use the original code. Just remove the faulty

    ?>
    [unwanted empty space here]
    <?php

    from line 14.

    I would definitely upgrade.

    I would, however, make a full backup of all website files and folders, and a full database backup. Should I run into any compatibility issues with plugins or theme, that I wouldn’t be able to solve after upgrade, I’d revert everything to the backup.

    But, than again, there aren’t many issues I cannot debug when it comes to WordPress. In this particular case, the only problems you might have are with qtranslate (which I kind of dumped in favor of mqtranslate on most of the multilangual websites I ran). If you want to make the switch, here’s a small snippet to make Customizr compatible with mqtranslate too (this goes into functions.php of the child theme):

    if ( is_plugin_active('mqtranslate/mqtranslate.php') ) {
    	add_filter( 'tc_slide_link_url' , 'tc_url_lang' );
    	add_filter( 'tc_logo_link_url' , 'tc_url_lang');
    	add_filter( 'tc_fp_link_url' , 'tc_url_lang');
    	add_filter( 'tc_slide_title', 'tc_apply_qtranslate' );
    	add_filter( 'tc_slide_text', 'tc_apply_qtranslate' );
    	add_filter( 'tc_slide_button_text', 'tc_apply_qtranslate' );
    	add_filter( 'tc_slide_background_alt', 'tc_apply_qtranslate' );
    	add_filter( 'tc_fp_text', 'tc_apply_qtranslate' );
    	add_filter( 'tc_fp_button_text', 'tc_apply_qtranslate' );
    	add_filter( 'tc_slide_title_length'  , 'tc_remove_char_limit');
    	add_filter( 'tc_slide_text_length'   , 'tc_remove_char_limit');
    	add_filter( 'tc_slide_button_length' , 'tc_remove_char_limit');
    	add_filter( 'tc_fp_text_length' , 'tc_remove_char_limit');
    }

    Just keep in mind that I already made a github commit to the Customizr master to make it compatible with mqtranslate. If and when this commit gets included into Customzir, the code above would be rendered useless. It won’t break any website that uses it, but it would slow any page that loads a slider with a fraction of a second, applying those filters twice on all sliders.

    If you choose not to make the switch, you probably need to go into qtranslate.php and manually edit (~ line 90) to

    define('QT_SUPPORTED_WP_VERSION', '3.9.1');

    Also, to suppress some ugly warnings, you might want to replace qtrans_localeForCurrentLanguage() function in qtranslate_hooks.php (~ line 47) with:

    function qtrans_localeForCurrentLanguage($locale){
    	global $q_config;
    	if(!array_key_exists('language', $q_config)){$q_config['language'] = $q_config['default_language'];}
    	// try to figure out the correct locale
    	$locale = array();
    	$locale[] = $q_config['locale'][$q_config['language']].".utf8";
    	$locale[] = $q_config['locale'][$q_config['language']]."@euro";
    	$locale[] = $q_config['locale'][$q_config['language']];
    	$locale[] = $q_config['windows_locale'][$q_config['language']];
    	$locale[] = $q_config['language'];
    
    	// return the correct locale and most importantly set it (wordpress doesn't, which is bad)
    	// only set LC_TIME as everyhing else doesn't seem to work with windows
    	setlocale(LC_TIME, $locale);
    
    	return $q_config['locale'][$q_config['language']];
    }

    I hope this will help you upgrade and that all go smooth with it.

    As a side-note, qtranslate is known to be a very unwise plugin when it comes to server resources (it tries to filter everything, to make sure no untranslated content gets into the page and, in doing so, it slows your website a bit), so if you’re worried about your website performance you should definitely change to mqtranslate (a bit better from this pov, not by much though, after all it is a qtranslate fork).

    Cheers.

    You can easily link your blogpage to one of the featured blocks. Just select it from the list. A link to your website would be helpful.

    You probably need to place it inside the <head> section of every single page of your website.
    Can you provide a link to your website, please?

    Cathy, the slider and the featured pages block do not go away if you select blog to be displayed on first page.

    Here, I have the homepage set to display my latest posts.

    A link to your website would help us give you more specific advice.

Viewing 15 replies - 31 through 45 (of 681 total)