iber4
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Avoid TopSubmenu category to be clickableAwesome!
That solved the problem.
Thank you kindly.
Forum: Themes and Templates
In reply to: [Customizr] Avoid TopSubmenu category to be clickableI don’t see it that clear, please check:
I don’t want Courses to be clickable.
Forum: Themes and Templates
In reply to: [Customizr] Avoid TopSubmenu category to be clickableYes, subpages and parents…
Let me check this out.
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:Thank you ElectricFeet.
Long Life to Customizr!
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:Moving was time-consuming, as always is… but I’m almost 100% done in the transition.
Polylang is clear and efficient, also cares about the permalinks, which I didn’t have on /mqtranslate.
I did make the modifications in my child functions.php… Perfect! You tutorial is so so clear.
So far so good with Polylang, keep it that way because it seems a more promising plugin than mqTranslate. Also, it worth taking the time of creating translated pages/removing tags, it really does.
Thank you for all the great support, I might ask you something later, but now I’m good enough.
Mark as solved and close the thread if you want.
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:Electric, don’t move a muscle… Already moving to Polylang.
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:You don’t want to know how many things happened till I get here….
Long story short:
Seems that Checks if a plugin is activated function is admin area only.
NOTE: defined in wp-admin/includes/plugin.php, so this is only available from within the admin pages, and any references to this function must be hooked to admin_init or a later action. If you want to use this function from within a template, you will need to manually require plugin.php, an example is below.
http://codex.wordpress.org/Function_Reference/is_plugin_active
So I solved with this hack:
/**
* Detect plugin. For use on Front End only.
*/
include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );Before calling the snipped code you pasted in functions.php
No errors now, no crashes, but text in slider completely disappeared…
I’m kind of back to the beginning… :-S
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:<?php
Error fixed with:
?>
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:From the cgi_error_log
20140803T160945: www…./wp-admin/admin-ajax.php
PHP Fatal error: Call to undefined function is_plugin_active() in /…../domain/abcweb/wp-content/themes/customizrchild/functions.php on line 21Line 21 is:
if ( is_plugin_active(‘mqtranslate/mqtranslate.php’) ) {
With just the <?php tag:
PHP Parse error: syntax error, unexpected $end in /…../wp-content/themes/customizrchild/functions.php on line 1
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:Updating…
– I put out the Child Theme and create a new one…
Same behaviour.
– BUT if I put out the functions.php file it also works.
So, it work with no file at all.
– If I insert the code, in the main theme functions.php, customizr (activated)
<?php
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’);
}CRASH!!!
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:What about this???
/*
* QTranslate
* Credits : @acub, http://websiter.ro
*/
if ( current_theme_supports( ‘qtranslate’ ) && is_plugin_active(‘qtranslate/qtranslate.php’) ) {
//outputs correct urls for current language : in logo, slider
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’);
function tc_url_lang($url) {
return ( function_exists( ‘qtrans_convertURL’ ) ) ? qtrans_convertURL($url) : $url;
}//outputs the qtranslate translation for slider, featured pages
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’ );
function tc_apply_qtranslate ($text) {
return call_user_func( ‘__’ , $text );
}Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:class-fire-init.php talks a lot of qtranslate, that makes some difference???
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:I might have some other hack that is pumping up qTranslate crap and can’t be handle without that function.
I did that already, other computer or WP Editor, same results…
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:I even deleted qTranslate… same error.
I don’t not what to do, it’s frustrating! 🙁
Forum: Themes and Templates
In reply to: [Customizr] Tagline on Customizr /mqtranslate ES: EN:It seems it needs this formula to avoid crashing:
if (function_exists(‘qtrans_convertURL’)) {
add_filter(‘walker_nav_menu_start_el’, ‘qtrans_home_mitem’, 10, 4);
function qtrans_home_mitem($output, $item, $depth, $args) {
return ( get_home_url(null,’/’,’http’) == $item->url || get_home_url(null,”,’http’) == $item->url ) ? str_replace($item->url, qtrans_convertURL($item->url), $output) : $output;
}
}even with qTranslate deactivated.