Ändra språk på Portfolio Meta i Themify och Polylang
För att detta ska funka behöver du alltså Themify Ultra som tema och tillägget Polylang. Sen behöver du ett barntema.
- Det första du måste göra är att kopiera filen portfolio-meta.php i mappen (wp-content/themes/themify-ultra/includes/portfolio-meta.php).
- Skapa en mapp i ditt barntema som heter includes och klistra in porfolio-meta.php där.
Filen ser ut såhär:

<div class="project-meta">
<?php if ($client) : ?>
<div class="project-client">
<strong><?php _e('Client', 'themify'); ?></strong>
<?php echo wp_kses_post($client); ?>
</div>
<?php endif; ?>
<?php if ($services) : ?>
<div class="project-services">
<strong><?php _e('Services', 'themify'); ?></strong>
<?php echo wp_kses_post($services); ?>
</div>
<?php endif; ?>
<?php if ($date): ?>
<div class="project-date">
<strong><?php _e('Date', 'themify'); ?></strong>
<?php echo wp_kses_post($date); ?>
</div>
<?php endif; ?>
<?php if ($launch) : ?>
<div class="project-view">
<strong><?php _e('View', 'themify'); ?></strong>
<a href="<?php echo esc_url($launch); ?>"><?php _e('Launch Project', 'themify'); ?></a>
</div>
<?php endif; ?>
</div>
<?php
endif; // $client || $services || $date || $launch ?>
- Redigera filen antingen direkt på servern eller ladda ner den till din dator och redigera. Ladda upp när du är klar.
- Det du behöver göra är att byta ut ovanstående kod till följande:
<div class="project-meta">
<?php if ($client) : ?>
<div class="project-client">
<strong><?php _e(pll_current_language() == "en" ? ' Client' : 'Klient') ;?></strong>
<?php echo wp_kses_post($client); ?>
</div>
<?php endif; ?>
<?php if ($services) : ?>
<div class="project-services">
<strong><?php _e(pll_current_language() == "en" ? ' Services' : 'Tjänster') ; ?></strong>
<?php echo wp_kses_post($services); ?>
</div>
<?php endif; ?>
<?php if ($date): ?>
<div class="project-date">
<strong><?php _e(pll_current_language() == "en" ? ' Date' : 'Datum') ; ?></strong>
<?php echo wp_kses_post($date); ?>
</div>
<?php endif; ?>
<?php if ($launch) : ?>
<div class="project-view">
<strong><?php _e(pll_current_language() == "en" ? ' View' : 'Till Projektet') ; ?></strong>
<a href="<?php echo esc_url($launch); ?>"><?php _e(pll_current_language() == "en" ? ' Launch Project' : 'Till Webbsidan') ; ?></a>
</div>
<?php endif; ?>
</div>
<?php
endif; // $client || $services || $date || $launch ?>
Se bild nedan för förklaring:

Spara filen i (wp-content/themes/namn-på-ditt-barntema/includes) – mappen som portfolio-meta.php. Överallt där det står “namn-på-ditt-barntema” ersätter du med namnet på ditt barntema, naturligtvis.
Nu kommer informationen att finnas kvar även om du uppdaterar temat.
Har du frågor, lämna gärna en kommentar nedan.