Changing archive title and subtitle "POST ARCHIVE BY MONTH"

Hi there

Is it possible to change the title and subtitle from the “Post Archive by Month” page?

For the Category Page I was able to change title and subtitle but how would it work with monthly archive?

Thank you very much for your help!

Hi Felix,

It would be possible but it would require customization. I can point you to the correct templates, but the entire customization is outside the scope of out support.
1.) On your installation, via FTP navigate to this folder:
\wp-content\themes\x\framework\legacy\cranium\headers\views\integrity.
2.)Look for this file: _landmark-header.php
3.) Copy that file on your child theme here: \wp-content\themes\x-child\framework\legacy\cranium\headers\views\integrity. That exact folder doesn’t exist by default on child theme. You might need to create it.
4.) Open the copied file. Starting on line 103 check and edit as you needed.

Hope this helps.

Hi Lely

This worked absolutely perfect! Thank you very much for your great support. :blush:

You’re welcome!
Thanks for letting us know that @Lely’s response has worked for you.

Hi there

Is this also possible for my Italian version of the Website?

At the moment I have this code for the german version:

<?php elseif ( is_month() ) : ?>

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php _e( 'Archiv', '__x__' ); ?></span></h1>
    <p class="p-landmark-sub"><span><?php _e( "Beiträge vom ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p>
  </header>

Thank you very much for your help!

Hello Felix,

Are you using a language translation plugin or a language translation file? It is recommended that you translate those keywords via the plugin because the text above were hard coded. Only the translation plugin or language translation file is the safest in translating all the texts in your site.

Hope this helps.

Hi RueNel

Thank you very much for your reply. I am using WPML Multilingual CMS Plugin. But the post archive by month was originally in English and I changed this text hard coded to german. Would it be possible to change the standard text to german in WPML and then manage the Italian translation?

Thank you very much for your help!

Hi Felix,

I recommend setting it back to its default text, and just use the translation plugin like WPML or MO/PO files to translate. The text on the template also serves as a cue used for matching to the stored translations. Changing it will then of course, you’ll have to re-translate it since there is no match anymore.

Please check WPML documentation and test, you can change it through it. But make sure the template strings are unchanged. You can also check this https://wpml.org/forums/topic/how-to-change-the-string-value-in-the-original-language/

Thanks!

Hi Rad

Thank you very much for your excellent recommendation. I did it as you said and it works perfect with WPML.

As I have written my post excerpts manually I have implemented the “Read more” Text at the end of the excerpts like this in the functions.php:


//* Changing excerpt more - only works where excerpt IS hand-crafted
function manual_excerpt_more( $excerpt ) {
	$excerpt_more = '';
	if( has_excerpt() ) {
    	$excerpt_more = '&nbsp;<a href="' . get_permalink() . '" rel="nofollow"><small><b> weiter&nbsp;lesen&nbsp;></b></small></a>';
	}
	return $excerpt . $excerpt_more;
}
add_filter( 'get_the_excerpt', 'manual_excerpt_more' );

Is there any chance to get this also for the italian version of my website?

Thank you very much for your help!

Hello Felix,

You will need to reset the keyword to English:

//* Changing excerpt more - only works where excerpt IS hand-crafted
function manual_excerpt_more( $excerpt ) {
	$excerpt_more = '';
	if( has_excerpt() ) {
    	$excerpt_more = '&nbsp;<a href="' . get_permalink() . '" rel="nofollow"><small><b>' . _e( 'read more', '__x__' ) . '&nbsp;lesen&nbsp;</b></small></a>';
	}
	return $excerpt . $excerpt_more;
}
add_filter( 'get_the_excerpt', 'manual_excerpt_more' );

And then go to WPML > String Translation to translate the read more keyword into German and Italian.

Hope this helps.

Hi RueNel

Thank you very much for your help. When I insert the code to reset to English, the “read more” turns in both languages into “lesen”. Also in the WPML > String Translation I am not able to translate this into German and Italian.

Any idea what I do wrong?

Thank you very much for your help!

Hi Felix,

Please update the previous code to this:

//* Changing excerpt more - only works where excerpt IS hand-crafted
function manual_excerpt_more( $excerpt ) {
	$excerpt_more = '';
	if( has_excerpt() ) {
    	$excerpt_more = '&nbsp;<a href="' . get_permalink() . '" rel="nofollow"><small><b>' . __( 'read more', '__x__' ) . '</b></small></a>';
	}
	return $excerpt . $excerpt_more;
}
add_filter( 'get_the_excerpt', 'manual_excerpt_more' );

Let us know how it goes!

Hi thai

Thank you very much! This works absolutely perfect. Great support!

I have noticed, that the recent post widget (Neue Beiträge) in the right column doesn’t work as it should on the Blog page. The recent post element on the start page works perfectly. Also it works on the Blog page when I insert a text Widget with the shortcode [recent_posts count=“6”]. But then I have a strange Design with small pictures and excerpts of the posts as well.

Could this be because of multi lingual posts? Because I think, it has worked as single language perfectly.

Thank you very much for your help.

Hi @fbrugger,

The recent posts widget on the sidebar is default WordPress widget which you can find it under Appearance > Widgets.

[recent_posts count="6"] this is the recent posts shortcode of X theme: http://demo.theme.co/integrity-1/shortcodes/recent-posts/

So the design is different.

Regards!

Hi thai

Thank you very much for your help. But do you know, why default Wordpress recent post widget is not working anymore in my page?

Thanks again.

Hi @fbrugger,

Please try with this solution:

Let us know how it goes!

Hi thai

Absolutely brilliant! This was the exact solution for the problem.

Thank you very much for your great help!

You’re most welcome, Felix.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.