-
Humanovation
The following code used to move the published and updated dates to the end of the article. After the most recent GP update, half of the info is at the top and half is at the bottom. How do I make it work like it used to?
.posted-on .updated { display: inline; } .posted-on .published:before { content: "Posted: "; } .posted-on .updated::before { content: ", Updated: "; } footer.entry-meta .posted-on { display: flex !important; flex-direction: row-reverse; justify-content: flex-end; }
-
Hi there,
can you share a link to where i can see the issue ?
-
Humanovation
In Private area …
-
Your CSS has been minified and cached in Autoptimize.
Which is probably why that CSS is not being loaded, so try disabling autoptimize.However that CSS would not move the Dates from the Top of the Post to the very end of the post.
It simply adds the wordsPosted
andUpdated
before the two dates and reverses the order they are displayed in. -
Humanovation
No, Autoptimize had been cleared, and all the caches cleared again. Also, just deactivated it, cleared caches again, and the issue persists. Also, when I go back to the previous version of the theme, everything works as it is supposed to.
Ahhh … another piece of the puzzle. You had me add a filter to the functions.php file in this thread:
https://generate.support/topic/moved-meta-to-bottom-now-wrong-order/I tried readding to the 3.4 functions file and am getting an error.
So, its not a CSS issue, it’s an issue with the following filter:
`add_filter( ‘generate_header_entry_meta_items’, ‘__return_empty_array’ );
add_filter( ‘generate_footer_entry_meta_items’, function( $items ) {
return array(
‘date’,
‘author’,
‘categories’,
‘tags’,
‘comments-link’,
‘post-navigation’,
);
} );’ -
Humanovation
The error reads:
Uncaught Error: Undefined constant “‘generate_header_entry_meta_items’” in wp-content/themes/generatepress/functions.php:125
Stack trace:
#0 wp-settings.php(611): include()
#1 wp-config.php(103): require_once(‘/home/u88891374…’)
#2 wp-load.php(50): require_once(‘/home/u88891374…’)
#3 wp-admin/admin.php(34): require_once(‘/home/u88891374…’)
#4 wp-admin/theme-editor.php(10): require_once(‘/home/u88891374…’)
#5 {main}
thrown -
OK, so you can’t make changes to the Themes files, as you have discovered those changes will be lost when you update the Theme.
This article explains how to add PHP to your site:
https://docs.generatepress.com/article/adding-php/
And you can use this code, which i have fixed the errors it contained from when you copied it from the forum without the formatting:
add_filter( 'generate_header_entry_meta_items', '__return_empty_array' ); add_filter( 'generate_footer_entry_meta_items', function( $items ) { return array( 'date', 'author', 'categories', 'tags', 'comments-link', 'post-navigation', ); } );
-
Humanovation
solved
-
Humanovation
solved
-
Both of those codes are PHP Snippets.
This doc explains how to add them: -
Humanovation
solved
-
Glad to hear that!
- You must be logged in to reply to this topic.