Forum Replies Created

Viewing 15 replies - 646 through 660 (of 681 total)
  • The code I posted fades on my website and it does so from the child theme’s style.css. Check it out: (ccbra.ro). Yours, however, doesn’t. As far as I can see you have a few scripts going on that page, one of them disabling right click, right? My best guess is that one of them interferes with the slider. Try disabling them one by one. If rightclick is not disabled on your first page, some bad script is disabling it, as nothing happens when I do it. Tried 3 browsers so far.

    There’s some bad mojo in the scripts of that website. Really bad.

    Put this into your child theme’s style.css or into cutomizr style.css. Do not put it in Custom CSS textarea under Appearance–>Customiz’it!, as it will strip the “>” and it won’t work!

    ul.nav li.dropdown:hover > ul.dropdown-menu{ display: block; }
    ul.nav li.dropdown > ul.dropdown-menu {top: 96%; padding-top: 10px;}

    Install Real Time Find and Replace plugin. Under Tools->Real Time Find and Replace, replace

    data-toggle="dropdown" data-target="#"

    with a single space character. The text to be replaced should also have a single space character before it. No regex. No mods to parent theme files needed. Should work.

    As a result, it might get a bit tricky when on narrow layout, because the submenus will appear and dissapear on hover. That’s the reason why the children are only displayed on parent click in the first place. It’s a trade-off. A bit better on computer, much worse on smartphone. 🙂

    get rid of it:

    .navbar { display: none; }

    make it transparent, but keep the content:

    .navbar .navbar-inner { background: none; box-shadow:none; }

    This code should go in the last textarea of theme options page (Appearance > Customiz’it!), under Custom CSS.

    Thread Starter acub

    (@acub)

    functions.php of your child theme should be empty if you haven’t written any custom function yet. It should not be a copy of functions.php from customizr, as that might generate serious problems because it would redeclare functions that are already declared.

    When “empty”, it should look like this:

    <?php

    You may write the code above just after first line. Please notice that it doesn’t have the ending of php code: ?> and this is how it’s supposed to be.

    As I was writing this I realized the reason why it’s not working for you is probably because you do not have an image (logo) in your header and do_action(‘__logo_title’) might not get fired in your installation. Try replacing ‘__logo_title’ with ‘before_header’ in the code I gave above.

    Did you also place the css in style.css? We’re talking about the child theme here.

    Also, you can always check the page source to see if the language chooser is output or not (and you only have a problem displaying it) and compare it to my source. See what’s wrong.

    Thread Starter acub

    (@acub)

    @rodrigogd: I myself have added the language changer in a different way, by hooking it to the __logo_title and positioning it fixed, on the left side. I also modified the flags a bit, but I think this is more of a personal choice. If you don’t modify the flags (I wanted them bigger), you’ll have to tweak the css, to make the selector smaller.

    Here you can see how it looks, and the implementation is only done in functions.php and style.css of the child theme, without modifying any of the main theme files. As of today, I’m actually proud to say that all the mods I have previously done to Customizr files are gone and all my tweaks are inside the child theme. I even tested by deleting Customizr and reinstalling it, to make sure. 🙂

    In functions.php:

    add_action('__logo_title', 'qtr_language_changer');
    function qtr_language_changer() {
    	echo qtrans_generateLanguageSelectCode('image');
    	}

    In style.css:

    ul.qtrans_language_chooser {
    position: fixed;
    list-style-type:none;
    margin: 132px 0 0 3px;
    background-color: rgba(51, 102, 153,.35);
    box-shadow: 2px 5px 7px rgba(0,0,0,.21);
    border-radius: 10px;
    border: 1px rgba(255,255,255,.5) solid;
    padding: 7px 10px 7px 22px;
    left: -17px;
    -webkit-transition: background-color 200ms linear;
    -moz-transition: background-color 200ms linear;
    -o-transition: background-color 200ms linear;
    -ms-transition: background-color 200ms linear;
    transition: background-color 200ms linear;
    z-index: 201;
    }
    ul.qtrans_language_chooser:hover {background-color: rgba(153,204,255,.65); box-shadow: 3px 8px 10px rgba(0,0,0,.15);}
    ul.qtrans_language_chooser li.active {display: none;}
    ul.qtrans_language_chooser li a {width: 32px; height: 32px;}

    But again, the way you choose to display your language chooser is something that doesn’t necessarily need to be discussed here, as I wanted to focus on the functionality of making Customizr multilingual ready, rather than on design and position of the lang chooser.

    Thread Starter acub

    (@acub)

    On another note, I’d be more than happy to provide help on making a future release of Customizr multilingual (by qTranslate) ready. Now, after I’ve done the mods, I thought about a much cleaner way to do them.

    Just let me know if I may start working on the current theme files or you have a development version for that. I think I can do it in a few hours.

    Thread Starter acub

    (@acub)

    I don’t think. I thank. You. For an awesome theme. 🙂

    Thread Starter acub

    (@acub)

    I have good news.

    You do not have to modify the theme’s files for all the above to work. All you need is to create the folder structure in your child theme folder and put the modified files there, leaving the originals untouched. The files in your child theme will have priority over the ones in customizr.

    So yes, you may use Customizr and qTranslate while being able to update Customizr.

    However, if the files you’re copying and modifying in your child theme will get changed and have added functionality in future releases of Customizr, you will not see those features until you don’t delete (or rename) your child theme modified files. However, it’s a great way to keep track of what files you modified and you’ll be able to make those mods again on the updated files of Customizr, again saving them in your own child theme.

    Thread Starter acub

    (@acub)

    Not very elegant, but it does the trick:
    Version 1:
    In functions.php of your childtheme:

    add_shortcode('my-featured-articles', 'my_featured_articles');
    function my_featured_articles() {
    	global $wp_query;
    	$temp_query = $wp_query;
    	$args = array (
    	'numberposts' => 10);
    // feel free to input whatever params you want in the $args array,
    // see WP_Query class documentation for that
    	$wp_query = new WP_query($args);
    	ob_start();
    		do_action('__loop');
    		$output = ob_get_contents();
    		ob_end_clean();
    	$wp_query = $temp_query;
    	return '</article></div>'.$output.'<div><article>';
    }

    In your page just write [my-featured-articles] and make sure it’s not contained in any html tag from that page (div, span, table) or it will generate layout problems.

    Version 2:
    Alternatively, you could create a template file starting from index.php from customizr folder, copying it to your child theme folder, adding

    global $wp_query;
    $temp_query = $wp_query;
    $args = array (
    'numberposts' => 10);
    // feel free to input whatever params you want in the $args array,
    // see WP_Query class documentation for that
    $wp_query = new WP_query($args);

    before the line do_action(‘__loop’); and

    $wp_query = $temp_query;

    right after that line. Save it with a custom name (my-custom-layout.php) in your child theme folder, upload and select it as the page template from the page atributes in edit page, dashboard. If you do it this way, you no longer need to edit functions.php of your child theme and it will no longer matter what you write in the page content, as it will never be displayed. Instead, the list of posts will show, nicely formatted according to theme layout.

    Cheers.

    Thread Starter acub

    (@acub)

    There’s one more modification you might be interested in, if you’re using Customizr and qTranslate.

    While the menus are working fine, applying the language variable (?lang=XX) to all links, the home link needs a little modification or your users will always be directed to the home page without the language information when pressing the site title or logo, depending on what you have.

    For this to work, you need to replace line 151 in wp-content/themes/customizr/parts/class-main-header.php with:

    <h1><a class="site-logo" href="<?php echo esc_url( home_url( '/' ) ); if ($_GET['lang']) echo '?lang='.$_GET['lang']; ?>" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><img src="<?php echo $logo_src ?>" alt="<?php _e( 'Back Home' , 'customizr' ); ?>" <?php echo $logo_img_style ?>/></a>

    and line 158, in the same file, with:

    <h1><a class="site-title" href="<?php echo esc_url( home_url( '/' ) ); if ($_GET['lang']) echo '?lang='.$_GET['lang']; ?>" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><?php bloginfo( 'name' ); ?></a>

    Now the language information won’t get lost.
    Later edit: I have used backticks for code, but it doesn’t show up in a code window. Sorry about that.

    @ef: you’re welcome.
    @killasonna: you need to paste the code I provided in the last textarea of the Appearance–>Customiz’it!, in backend, under: Custom CSS. You save and it works.

    Also, the initial code works if it’s inputted there, as the >’s get stripped away.
    If you do it in editor, in style.css, the >’s do not get stripped and it won’t work.
    However, you may strip the >’s yourself or use my code and it will work from editor too. 🙂

    Andrew, with all due respect, please read what I wrote carefully. The code only works IF you put it in the Custom CSS panel, contrary to what EF said, because the >’s are stripped. The code with >’s, as posted above, is wrong. It doesn’t work if you put it in a child theme, as EF mentioned. Only works if you strip the >’s. Or if you put it in the custom CSS panel which strips them for you.

    Am I making myself clear now?

    Because it’s wrong.
    It only works if it’s inserted in the themes’s options panel which strips away the >’s leaving the code as posted by me above. Also, the “left: 0;” lines are useless. The code works without them in IE, Chrome and FF. I don’t have other browsers installed here to test, but from my knowledge of CSS that line is useless for this effect.

    It works BECAUSE the >s are stripped away. The correct code is:

    .carousel .item {
    -webkit-transition: .7s ease-in-out opacity;
    -moz-transition: .7s ease-in-out opacity;
    -ms-transition: .7s ease-in-out opacity;
    -o-transition: .7s ease-in-out opacity;
    transition: .7s ease-in-out opacity;
    }
    
    .carousel .active.left, .carousel .active.right {
    opacity: 0;
    z-index: 2;
    }
    
    .carousel .next.left, .carousel .prev.right {
    opacity: 1;
    z-index: 1;
    }

    @andrew Nevins: Why would I open a new thread if I’m referring to a solution provided in this thread, which turns out to be a little bit misleading?

    Tried this and it doesn’t work for me. are you sure you didn’t omit anything? Could you show me a working example? For further reference, I tested this in Chrome 28.0.1500.95 m. I’m updating it as I write to the latest version, and I’ll let you know if it made a difference.

    Later edit: your code does work if it’s added in the custom CSS area of the theme options panel. However, it doesn’t work from child theme style.css.

    Very strange.

Viewing 15 replies - 646 through 660 (of 681 total)