Resolved

In footer just a J in stead of the year

Ultra Theme started by WebmasterEuropafietsers Apr 14, 2022 7 replies
WebmasterEuropafietsers Apr 14, 2022 · 3:09 pm #16789

We use the thema ‘Ultra Premium’. At the footer-settings of this theme we use the standard {copyright} {year} {site-title} as ‘Copyright text’
When I look at the footer (https://acceptatie-forum.europafietsers.nl) there is no year but only a ‘J’
as: © J Forum Europafietsers
in stead of: © 2022 Forum Europafietsers

What’s going wrong?

Andrew Misplon Puro Apr 14, 2022 · 3:45 pm #16790

Hi, thanks for reaching out.

I haven’t seen this issue before. Is there a time you can run a plugin conflict test, or do you perhaps have a staging/testing site?

If possible, temporarily deactivate all plugins. Does the issue resolve?

Andrew Misplon Puro Apr 14, 2022 · 4:47 pm #16794

Thanks for trying.

We could simplify the copyright function. Please, try the following:

– Install a new version of Ultra from Appearance > Themes > Add New > Upload Theme.

https://purothemes.com/wp-content/uploads/2022/04/ultra.2.6.5-beta.zip

I’ve wrapped in the copyright function in a function_exists check so we can overwrite it.

– Next, install the Code Snippets plugin https://wordpress.org/plugins/code-snippets/.

– Go to Snippets > Add New in WordPress. Name the snippet as required. Add the following in the snippet body:

if ( ! function_exists( 'ultra_footer_copyright_text_sub' ) ) :
/**
 * Insert footer text from theme settings.
 */
function ultra_footer_copyright_text_sub( $copyright ) {
	$site_title = '<a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a>';
	return str_replace(
		array( '{site-title}', '{copyright}', '{year}' ),
		array( $site_title, '&copy;', date( 'Y' ) ),
		$copyright
	);
}
endif;

Enable the option to run the snippet on the site front-end. Save and Active.

Kindly copy the above function from the forum and not from email, as email sometimes changes the inverted comma formatting.

Does the above help?

Thanks

WebmasterEuropafietsers Apr 14, 2022 · 5:04 pm #16795

I have to download this zip-file first, I assume?
I have done this and installed it. A message appears: The uploaded file exceeded the upload_max_filesize command in php.ini

And now?

Andrew Misplon Puro Apr 14, 2022 · 5:13 pm #16796

The new version of the theme must be installed first.

You can either adjust your file upload limit in your php.ini file, or if you have FTP access you can unzip the theme folder and then drag the unzipped folder into /wp-content/themes/ on your staging site server.

WebmasterEuropafietsers Apr 15, 2022 · 3:01 pm #16810

I have changed the max_size option into 4MB and now it is possible to install the new version (update the old-version).
I have installed the plugin Code Snippets and added the code and yes, the year is now displayed correctly.
Thank you very much!

Andrew Misplon Puro Apr 15, 2022 · 6:49 pm #16811

Thanks for the update. I’m glad to hear the change worked and the date is now displayed correctly.

All the best with your site.

Kind regards

Andrew

8 posts
Closed This topic is closed to new replies. Still stuck? Start a new topic in Ultra Theme.