Archived topic
All meta in one line above the post except tags
9 replies · Started by Dev Foundry on May 19, 2018
Hello,
I have been using GeneratePress for some time. I am very happy with it.
I used PHP code from this topic: https://generatepress.com/forums/topic/all-meta-in-one-single-line/
to get all the meta information to display below the title, above the post content, in one line. And it works great. Here is the exact github code I am using: https://gist.github.com/generatepress/a07fbf6ae38a490c1d6e
However now I would like to move tags below the post content, because with several different tags, this meta space can be a little cluttered ;)
Basically I need what this person asked for: https://generatepress.com/forums/topic/all-meta-in-one-single-line/#post-340860
He said that he resolved the issue by fiddling with the code, unfortunately I was not so lucky with it ;)
So to summarize: I would like to get the date, author and categories display at the top of the post and the tags below the post.
I would appreciate the help. :)
Hi there,
Try this snippet:
https://gist.github.com/leohsiang/39c2c432d7f7083d80b45ea6903b338f
With this CSS:
footer.entry-meta .cat-links,
footer.entry-meta .comments-link {
display: none;
}
.cat-links, .comments-link {
display: inline-block;
margin-left: 10px;
}
Let me know :)
Hello,
thank you for your answer. This works somewhat ;)
In a single post page it works as suspected: it shows the tags line at the very bottom:
[img]https://i.imgur.com/GxMf2rp.png[/img]
I would like however to ask if it would be possible to move it above the <hr> which I put in the AddToAny plugin, which (as you can tell) adds social media buttons at the bottom of posts:
[img]https://i.imgur.com/H99MP65.png[/img]
And the thing that is not intended is the tags and comments appearing in the post summary as well which I don't like:
[img]https://i.imgur.com/RK5RO38.png[/img]
Thank you for your help. Appreciate it :)
Any chance you can link me to the site in question?
Sure. It's http://www.devfoundry.pl
To switch the order, you would need to ask the plugin developer to see if there is a way to manually inserting it using our GP hooks so it's not right below the end of content. See Tom's explanation here:
https://generatepress.com/forums/topic/gp-hooks-to-insert-text-above-jetpack-related-images/#post-438080
https://generatepress.com/forums/topic/gp-hooks-to-insert-text-above-jetpack-related-images/page/2/#post-438432
As for the comment link on the post page, looks like it's duplicated. I've edited the CSS above:
https://generatepress.com/forums/topic/all-meta-in-one-line-above-the-post-except-tags/#post-579746
Ah, I feared that it may be the case. Yeah, I'll ask the plugin developer then and thanks for the posts links, they might be useful as well.
As for the updated CSS the comment link is gone, so that's great, but I would like to hide the tags links there as well.
I tried adding
footer.entry-meta .tags-links
but unfortunately that removes the tags links from the normal full post page as well. Any way to fix this?
Should be able to turn that off in the customizer: https://docs.generatepress.com/article/blog-content-layout/#archives
Ah, right. That works. Thank you very much.
No problem!