- This topic has 8 replies, 2 voices, and was last updated 3 years, 12 months ago by JOAQUIM GALANTE.
-
AuthorPosts
-
May 15, 2020 at 2:41 am #1285330JOAQUIM 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
May 15, 2020 at 3:40 am #1285394DavidStaffCustomer SupportHi 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.May 15, 2020 at 4:08 am #1285433JOAQUIM GALANTEHi David, When i put the clock code on ‘CSS aditional’ all code letters stay red
May 15, 2020 at 4:56 am #1285457JOAQUIM GALANTESorry 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’.
May 15, 2020 at 5:08 am #1285467DavidStaffCustomer SupportThat 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]
May 15, 2020 at 5:18 am #1285473JOAQUIM GALANTEDavid, when i put the php code on a create plugin and activate it a message say ‘Fatal error’.
May 15, 2020 at 5:24 am #1285477DavidStaffCustomer SupportInstall 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
May 15, 2020 at 5:32 am #1285495JOAQUIM GALANTEI 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.
May 15, 2020 at 5:38 am #1285504JOAQUIM GALANTEI use Pluginception
-
AuthorPosts
- The topic ‘Some improvements if possible’ is closed to new replies.