Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

CSS Not Working The Same After 3.4 Update …

  • 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 ?

  • 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 words Posted and Updated before the two dates and reverses the order they are displayed in.

  • 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’,
    );
    } );’

  • 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',
        );
    } );
    
  • solved

  • solved

  • Both of those codes are PHP Snippets.
    This doc explains how to add them:

    https://docs.generatepress.com/article/adding-php/

  • solved

  • Glad to hear that!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.