[Resolved] Some improvements if possible

Home Forums Support [Resolved] Some improvements if possible

Home Forums Support Some improvements if possible

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1285330
    JOAQUIM GALANTE

    Hi, i am very pleased for your help and with the potentiality of the theme GeneratePress.

    Now i ask for the last things to improve the site if it is possible :

    1. Put my language flags and insert a current date in a top header bar ?
    2. Put a Breaking News Section above featured grid ?
    3. Put another Featured News Category Caroussel Slider between Featured Grid and the Frontpage ?

    I don’t know if it is possible to be add to the the theme

    Thanks a lot

    #1285394
    David
    Staff
    Customer Support

    Hi there,

    1. You can move your Language Widget to the Top bar widget area.
    To display the current date – Tom provides the code to create a shortcode here:

    https://generatepress.com/forums/topic/shortcode-for-current-date/#post-632065

    You can use that to add the date to a HTML widget in the top bar.

    2. and 3. You can add use the Hook Element to insert content into the site:

    https://docs.generatepress.com/article/generate_hook_element_display/

    The after_header hook can be used to place elements after your site header and navigation.

    #1285433
    JOAQUIM GALANTE

    Hi David, When i put the clock code on ‘CSS aditional’ all code letters stay red

    #1285457
    JOAQUIM GALANTE

    Sorry for the my last comment.

    David i put the code

    add_shortcode( ‘custom_date’, function() {
    $time_string = ‘<time class=”entry-date published” datetime=”%1$s” itemprop=”datePublished”>%2$s</time>’;

    if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
    $time_string .= ‘<time class=”updated” datetime=”%3$s” itemprop=”dateModified” style=”display:none;”>%4$s</time>’;
    }

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )
    );

    $date = sprintf( ‘%3$s‘,
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    $time_string
    );

    return $date;
    } );

    in the HTML Widget and nothing happens.

    Say ‘Please use tab for identation’.

    #1285467
    David
    Staff
    Customer Support

    That code is PHP.
    It goes in either your Child Theme functions.php or use the Code Snippets plugin.
    More info:
    https://docs.generatepress.com/article/adding-php/

    Once that is added you add this to your widget:

    [custom_date]

    #1285473
    JOAQUIM GALANTE

    David, when i put the php code on a create plugin and activate it a message say ‘Fatal error’.

    #1285477
    David
    Staff
    Customer Support

    Install the Code Snippets plugin:

    https://en-gb.wordpress.org/plugins/code-snippets/

    And Copy the code from here:

    https://generatepress.com/forums/topic/shortcode-for-current-date/#post-632065

    Then paste the code in Code Snippets

    #1285495
    JOAQUIM GALANTE

    I have problem David, once i installed this program and i puted a code when activated i must to recover the site because a fatal error appear, since then always i install the Code Snippets plugin and activate it a fatal error occurs.

    #1285504
    JOAQUIM GALANTE

    I use Pluginception

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Some improvements if possible’ is closed to new replies.