Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #201094

    Hello,

    I would like to show tags and categories instead of the date and comments under the pic in the “blog grid” style blog. If you could send me code and tell me what files to modify, I would greatly appreciate it.
    eg: instead of “0 Comments/October 21, 2013” -> “category1/tag1, tag2”

    I realize this might be out of your scope for providing support, but I would appreciate your help if you could offer it.

    Also, could you please tell me how to change the theme language to Japanese? (where should I place the .mo, .po files)

    Thank you for your consideration.

    • This topic was modified 11 years, 2 months ago by jmalevic.
    #201449

    Hey jmalevic!

    1) Open up /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php and replace

    
                        if($show_meta && !empty($excerpt))
    					{
    						$output .= "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    
    							$output .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>";
    						}
                            $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false));
    						$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    						$output .= "</div>";
    					}
    

    with

    
            if($show_meta && !empty($excerpt))
            {
                $output .= "<div class='slide-meta'>";
    
                $taxonomies  = get_object_taxonomies(get_post_type($the_id));
                $cats = '';
                $excluded_taxonomies =  apply_filters('avf_exclude_taxonomies', array('post_tag','post_format'), get_post_type($the_id), $the_id);
    
                if(!empty($taxonomies))
                {
                    foreach($taxonomies as $taxonomy)
                    {
                        if(!in_array($taxonomy, $excluded_taxonomies))
                        {
                            $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' ';
                        }
                    }
                }
    
                if(!empty($cats))
                {
                    $output .= '<div class="slide-meta-comments">';
                    $output .= $cats;
                    $output .= "</div><div class='slide-meta-del'>/</div>";
    				        }
    
                $output .= "<div class='slide-meta-time updated'>". get_the_tag_list( __('Tags:','avia_framework').' ', ',') ."</div>";
    
    						$output .= "</div>";
    					}
    

    2) Please try to use Codestyling to translate all text strings within the theme code: http://wordpress.org/plugins/codestyling-localization/
    Install the plugin, go to Tools > Localization and select “Themes”. Then search for “Enfold” in the list and click on “Add new language”. Then select your language from the list and click the “create po-file” button. Click on “Rescan” to search for all text strings. Then click on “Edit” and translate the required strings from the “avia_framework” textdomain. At least click the “create mo file” button next to the “Textdomain” selection dropdown (top left corner).

    Regards,
    Peter

    #201554
    This reply has been marked as private.
    #202654

    Hey!

    Can you do a quick double check that you are copying out the text exactly and pasting into the file using a text editor that doesn’t alter the contents.

    I’ll tag the topic for Peter as well so he can check it over for any syntax errors.

    Best regards,
    Devin

    #202882

    Thank you for the reply,

    I’m using the dreamweaver find and replace function to change the code so I don’t think it should be altering the code; but I am a beginner so never know.

    Thank you for double checking the code.

    #203222

    Hi!

    Yes, there was a syntax error with the quotes. I updated the code – please try it again.

    Cheers!
    Peter

    #203260

    Hello,

    The categories seem to be showing fine, but the tags are not working. Please let me know if you can find a solution.

    Thank you

    • This reply was modified 11 years, 1 month ago by jmalevic.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘modification / changing language’ is closed to new replies.