Site logo

Archived topic

Shortcode Date

50 replies · Started by Anthony on July 30, 2019

Viewing posts 16–30 of 51

yeah comment count with icon to far right, is this possible? also, how would i replace the date with [posted_time]?

You can add comment count via the Customizer > Layout > Blog options. And i can provide some CSS to position it.

To replace the date, first disable the date in the blog options then:

1. Create a new Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/

2. Add the shortcode to the content text area.
3. Select the after_entry_title hook from the list
4. Check Execute Shortcodes
5. Display Rules tab set All Archives and Blog as the Locations.

you are a genius, thank you. i enabled comment count but it looks like a tag.

The CSS you have for stying your tag, remove the comments-link from the selector ie.

.cat-links a, .tags-links a, .comments-link a

becomes:

.cat-links a, .tags-links a

worked. and then how do you move comments to the far right? also, why is post1's tags shifted to the left?

I updated the CSS here which will align the comments to the far right of the tags.

The difference in alignment is due to the length of the title - Post1 is slightly shorter in length. The Flex grid being used will adapt to fit the content. If you want to keep all titles the same width ( longer titles will wrap ) then add this and adjust to suit:

.separate-containers .entry-header {
    width: 20%;
}

thanks. when i write content inside the post, everything shows up and moves stuff out of place. how do i hide it until you click the post like you did with your website?

In the Blog Options you can set the Excerpt Length to 0

can i make each post linkable on hover? like when you hover over an individual post, its clickable instead of clicking on the post title to go to the content.

when i click my post the content shows up in between the title and tag, how do i fix this? can i make the post title bigger without changing the size of the titles on the homepage? also, how do i get [posted_time] to appear in place of the one on the content page?

I updated the CSS here to exclude the single post from the flex styling we added.
The Single Post uses the H1 ( the blog grid uses the H2 ) - so simply adjust its size in the Customizer > Typography > Headings > H1

For the posted time - edit the Hook Element you created and on Display Rules add another Location of: Posts > All Posts.

You can remove the Date in Customizer > Layout > Blog --> Single

it worked! what typography does the [posted_date] fall under so i can do the same thing? can i put the tags next to the title instead of at the bottom on the content page?

Try adding this PHP snippet - should move the tags below the title, then i can look at some CSS for positioning:

add_filter( 'generate_header_entry_meta_items', function( $items ) {
   if ( is_single() ) {
       $items = array(
           'tags',
       );
   }
   return $items;
} );

i added the snippet but it didnt do anything

This archived topic is closed to new replies.