mirilailai
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textWow I don’t know how but I managed to do it with the strings ?? The custom field didnt accept php code so I made some changes to index.php and the magic happened. For those who are wondering how to use strings here how I managed to do it:
in functions.php I wrote just after the opening <?php tag: pll_register_string(‘intro_content’,’Text here’,’SPA’);
It doesn’t matter what you will type in the brackets actually. It is used just to find it in the String translation panel in Polylang options.
intro_content is the name, Text here is the string to be pulled out and SPA is my theme.The string should be on the Polylang settings page now. Go and translate it for any added language.
Then in the custom field which you want to be translated just type
<?php pll_e('Text here'); ?>
and it will pull out the translation you made in the popylang settings page.For my case the custom field don’t accept php codes so I went to index.php ( where the custom field appear;) and replaced the php code there with the above one.
And this is my noob guide ?? I know it is funny for the developers who understand perfectly the plugin’s guide but after all not everyone who visits this forum is a professionalist.
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textSo I have the function already but when I use the shortcodes it doesn’t work..So does that mean the custom field doesn’t support shortcodes and I should try the strings option?
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textI add `function polylang_shortcode($atts, $content = null)
{
if (empty($content))
return ”;
extract( shortcode_atts( array(‘lang’ => ”), $atts ) );
if (empty($lang))
return “<h3>You must specify ‘lang’ using shortcode: polylang</h3>”;return ($lang == pll_current_language()) ? $content : ”;
}
add_shortcode(‘polylang’, ‘polylang_shortcode’);`and it pulls me an error:
Fatal error: Cannot redeclare polylang_shortcode() (previously declared in /home/meliaspa/www/www/wp-content/plugins/polylang/polylang.php:33) in /home/meliaspa/www/www/wp-content/themes/spa/functions.php on line 11
when I save..Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textI think they can
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textIf my theme is called “spa” and the theme field is called Intro Content, how should I register the string?
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textYeah I did but it looks very complicated. I have no idea how to pull these strings. I’m trying to translate a theme custom field which is in the Theme Options.
Forum: Plugins
In reply to: [Polylang] Polylang shortcode (like qTranslate) for theme options and textHi,
Nice solution ronshe but I’m new in this multilingual functions so could you please explain where to add this shortcode script you wrote so I can use the shortcodes later?Thank you.
Forum: Themes and Templates
In reply to: [Hueman] Mobile Version – Different Contentgot it… thank you!
Forum: Themes and Templates
In reply to: [Hueman] Mobile Version – Different Contentwow great solution!
where to wrap these? on page edit or somewhere in the theme files?Forum: Themes and Templates
In reply to: [Hueman] v1.1.9 content/s2sidebar problemOk, I didn’t know that.
1.1.2 version has always been working well except for the dynamic.css where it copies the code in it over and over again till the file become very huge and brake my back-end Theme Options and Editor page. I think this happens whenever I press Save Changes or on every load of my website.
Can you provide support for this kind of a problem? I’m fine with no updating the theme version.(I can’t imagine what it was like :X just for few changes I see codes in my dreams now)
Forum: Themes and Templates
In reply to: [Hueman] Footer Widget Area 2 problemThanks the script alignment worked.
Forum: Themes and Templates
In reply to: [Hueman] v1.1.9 content/s2sidebar problemIf I set
.content { width : 700px; }
and turn the .col-3cm .content float from right to left, then it becomes the exact look of the site I want but the sidebars go missing at the bottom…Forum: Themes and Templates
In reply to: [Hueman] The theme v.1.1.2 back-end crashedMany thanks ??
Forum: Themes and Templates
In reply to: [Hueman] The theme v.1.1.2 back-end crashedI wish to update it too but I don’t know how to save my changes to a child theme cuz I have made a lot of changes to the original style.css of the theme and after the update all images and coding will disappear..
Forum: Themes and Templates
In reply to: [Hueman] The theme v.1.1.2 back-end crashedIts seems the problem occurs every time I press Save Changes in the Theme Options. It has something to do with dynamic.css. Two hours ago the file was 40MB, 1 min ago it was 106MB and after 1 more press on Save Changes it became 265MB.
I opened it and saw that it copies the dynamic css code (which is few rows) over and over again. Maybe the theme author could help here.
Should I copy the dynamic code (which is few rows) from the Theme Options and put it in a new dynamic.css?