Tagged: featured content, languages
- This topic has 13 replies, 2 voices, and was last updated 8 years, 6 months ago by Mahesh.
-
AuthorPosts
-
February 12, 2016 at 3:12 pm #85270scubafreakParticipant
Hi there,
Thanks for the great Adventurous Theme! It looks good and customization seems easy (even for IT illiterate like me..;). Well, easy with a couple of questions, please.1. How to link individual post Categories with individual Featured Content images? I understand how to add link to the Featured Content but haven’t been able to figure out proper link syntax to Categories.
2. How to include internal link to the image inserted into a sidebar text widget?
3. Promoheadline: how to change action button into contact form (name & email)?
4. How do you recommend to best handle email automation? I so far installed Contact form 7 plug-in but haven’t played with it enough yet. What about integrating a software like MailChimp?
5. How to translate e.g. “Posted on February 12, 2016 under in XXXX | By XXXX. | Leave a reply | Edit” and similar default texts into another language?
6. How to run a web/blog in two different languages? End-game: structure similar for both, content may vary.
Enough (for now 😉
Thanks a lot,
DanFebruary 12, 2016 at 4:16 pm #85274MaheshParticipantHi @scubafreak,
Thank you for your appreciation.
I’ll try to make the steps simpler.1. Link to category in featured content image.
I assume you’ve managed to put the images in featured content. For make the image link to selected category, go to “Dashboard=> Appearance=> Customize=> Featured Content=> Featured Content Settings” then scroll to “Link URL” and put the link of your desired category in the input box (example: http://yoursite/category/some-category). Repeat this as per the items in the featured content and the click save.2. I guess you’ve put an img tag in text widget to display image in the sidebar.
<img src="link of some image" alt="your-image" />
Change it to look as follows:<a href="your-desired-url" title="title-for-link"> <img src="link of some image" alt="your-image" /> </a>
3. This is not possible through options. You’ll need to hire a customizer.
4. We cannot say one particular plugin is best. Please visit this LINK and search for the appropriate plugin to handle email automation.
5. The theme is translation ready and support translations plugin such as WPML, Qtranslate. You can use those from WordPress.org repository.
6. You can use Qtranslate for this.
Regards,
MaheshFebruary 13, 2016 at 10:59 pm #85358scubafreakParticipantThanks Mahesh,
1-2. works great 😉3. understand. but it must be fairly simple, or? any hints, how can I do myself and which files to edit, please?
4-6. will try.
Best,
DanFebruary 14, 2016 at 10:22 am #85387MaheshParticipantHi @scubafreak,
For that, you have to create a child theme, you can find more details on creating child theme HERE. Then in
functions.php
add the following code and override it.function adventurous_homepage_headline() { //delete_transient( 'adventurous_homepage_headline' ); global $post, $wp_query, $adventurous_options_settings; $options = $adventurous_options_settings; // Getting data from Theme Options $disable_headline = $options[ 'disable_homepage_headline' ]; $disable_subheadline = $options[ 'disable_homepage_subheadline' ]; $disable_button = $options[ 'disable_homepage_button' ]; $homepage_headline = $options[ 'homepage_headline' ]; $homepage_subheadline = $options[ 'homepage_subheadline' ]; $homepage_headline_button = $options[ 'homepage_headline_button' ]; $homepage_headline_target = $options[ 'homepage_headline_target' ]; //support qTranslate plugin if ( function_exists( 'qtrans_convertURL' ) ) { $homepage_headline_url = qtrans_convertURL($options[ 'homepage_headline_url' ]); } else { $homepage_headline_url = $options[ 'homepage_headline_url' ]; } // Front page displays in Reading Settings $page_on_front = get_option('page_on_front') ; $page_for_posts = get_option('page_for_posts'); // Get Page ID outside Loop $page_id = $wp_query->get_queried_object_id(); if ( empty( $disable_headline ) || empty( $disable_subheadline ) || empty( $disable_button ) ) { if ( !$adventurous_homepage_headline = get_transient( 'adventurous_homepage_headline' ) ) { echo '<!-- refreshing cache -->'; $adventurous_homepage_headline = '<div id="homepage-message"><div class="container"><div class="left-section">'; if ( $disable_headline == "0" ) { $adventurous_homepage_headline .= '<h2>' . $homepage_headline . '</h2>'; } if ( $disable_subheadline == "0" ) { $adventurous_homepage_headline .= '<p>' . $homepage_subheadline . '</p>'; } $adventurous_homepage_headline .= '</div><!-- .left-section -->'; if ( !empty ( $homepage_headline_url ) && $disable_button == "0" ) { if ( !empty ( $homepage_headline_target ) ) { $headlinetarget = '_blank'; } else { $headlinetarget = '_self'; } $adventurous_homepage_headline .= '<div class="right-section"><a href="' . $homepage_headline_url . '" target="' . $headlinetarget . '">' . $homepage_headline_button . '</a></div><!-- .right-section -->'; } $adventurous_homepage_headline .= '</div><!-- .container --></div><!-- #homepage-message -->'; set_transient( 'adventurous_homepage_headline', $adventurous_homepage_headline, 86940 ); } echo $adventurous_homepage_headline; } }
Note: You have to replace the below section(Promotion headline button) with contact form.
if ( !empty ( $homepage_headline_url ) && $disable_button == "0" ) { if ( !empty ( $homepage_headline_target ) ) { $headlinetarget = '_blank'; } else { $headlinetarget = '_self'; } $adventurous_homepage_headline .= '<div class="right-section"><a href="' . $homepage_headline_url . '" target="' . $headlinetarget . '">' . $homepage_headline_button . '</a></div><!-- .right-section -->'; }
Regards,
MaheshFebruary 20, 2016 at 1:33 am #85842scubafreakParticipanthi @Mahesh,
I just realized you guys are from Nepal! We took our kids to Nepal in 2014 and spend 2 weeks living in Lura village – Solokhumbu valley, helping local people with some permaculture training and other stuff. Was great! How are you doing and what’s happening now, some time after the earthquake? I hope things got somehow back to normal…For the web – I decided to start with static translation. Hence created .po and .mo files for Czech language, added them to ‘languages’ directory. Then, switched to ‘cs_CZ’ language in Dashboard settings. Nothing happened. What else is required to get it working, please?
Best,
DanFebruary 22, 2016 at 10:55 am #85965MaheshParticipantHi @scubafreak,
Oh great to know you’ve been here and thank you for all your helps. 🙂
Glad you enjoyed you time here, hope you’ll visit us again.
Yes it was difficult time for all due to earthquake. People are gradually going back to their normal living.
The steps you’ve gone through is all you need to translate theme, its quite odd that nothing changed. Please use WPML or qtranslate plugins and try again.
Let me know if any problem.Regards,
MaheshFebruary 23, 2016 at 3:53 pm #86092scubafreakParticipantHi Mahesh,
Thanks – I don’t want to use the plugins, at least not at this stage.What I did in order to create a static theme translation:
1) added ‘cs_CZ.mo’ and ‘.po’ files into the wordpress installation – it works. Now, my admin menu and standard wordpress features are in Czech.
2) translated your ‘adventurous.pot’ file into ‘cs_CZ.mo’ and ‘.po’ files and downloaded them via FTP to: /www/domains/mydomain/wordpress/wp-content/themes/adventurous/languages
Unfortunately, the theme is still using default english language. What am I missing to make it work, please?
Thanks,
DanFebruary 23, 2016 at 4:37 pm #86100MaheshParticipantHi @scubafreak,
In my server there was no Czech language listed in my WordPress setting so I manually added cs_CZ.mo and po file and admin-cs_CZ.mo and po files. Then created cs_CZ.po file from adventurous.pot file with and edited with poedit which automatically genereate cs_CZ.mo file. And just for testing, I changed the string (Monthly Archive) to some other string(example: test language) and checked the frontend and the change was there, so it should work fine with yours too. Please post in your site url.
Regards,
MaheshFebruary 23, 2016 at 4:51 pm #86107scubafreakParticipantFebruary 23, 2016 at 5:01 pm #86108MaheshParticipantHi @scubafreak,
Can you please share the cs_CZ.po file that you’ve created for the theme.
Regards,
MaheshFebruary 23, 2016 at 5:22 pm #86110scubafreakParticipantHi @Mahesh,
I sent it via email to info@…
As you can see in the file, I translated only some features – to test it. I will finish the rest if it works well.
Best,
DanFebruary 23, 2016 at 5:49 pm #86113MaheshParticipantHi @scubafreak,
Yes, I got the file and thank you.
It seems you’ve done 19% translation. The translation seems to work fine on our server. And to some extent translations in your site is working too for example: archives, categories etc. Try to complete the translation. You can refer to this link:
https://translate.wordpress.org/projects/wp-themes/adventurous/cs/default
After you’ve translated, please share you complete zipped theme.Regards,
MaheshMay 13, 2016 at 6:50 pm #91652scubafreakParticipantHi Mahesh,
I finalized the translation and one of your colleagues sent me an email with the language file for the Adventurous Pro. Somehow, I could not find that email. Could you re-send, please?
Best,
DanMay 16, 2016 at 12:30 pm #91741MaheshParticipant -
AuthorPosts
- The topic ‘Featured content, Text widget, Promoheadline, Languages’ is closed to new replies.