- This topic has 23 replies, 2 voices, and was last updated 3 years, 2 months ago by David.
-
AuthorPosts
-
September 4, 2019 at 11:37 am #1001140Soumyadip
Hi Tom/David/Leo, please let me know how to add a beautiful author bio box with read more button on the right sidebar of my blog…
This is what I am looking for, refer to this website – https://www.recipetineats.com/creamy-mushroom-pasta/.
No plugins please! provide me the scripts and css
THanks!
September 4, 2019 at 2:36 pm #1001239DavidStaffCustomer SupportHi there,
we try to help people where we can with custom requirements, if it is within our reach we will do so – there should not be a concern you using a plugin, as code is code.
Fortunately i have something in my library you can use to create a Shortcode to add to your widgets:
https://gist.github.com/diggeddy/c448f642993866f79dbb960cbc450a6a
Use this CSS instead of that provided for a similar effect:
.author-box { text-align: center; } .author-box .avatar img { width: 80px; border-radius: 40px; vertical-align: middle; } .author-box .author-title { font-size: 18px; font-weight: bold; margin-top: 0.5em; margin-bottom: 0; } .author-box .author-summary, a.author-link { font-size: 13px; } .author-summary a.author-link { padding: 6px 12px; border-radius: 24px; text-transform: uppercase; }
You will still need to add a plugin like Conditional Widgets or Widget Logic to remove the empty widget if you’re using the Sidebar for Pages.
September 5, 2019 at 3:52 am #1001561SoumyadipWhere to put those…
I am a complete newbie in this.. I placed this css to the customisation >> additional css and php script to my function.php file.. what to do now..nothing appears in the sidebarSeptember 5, 2019 at 4:03 am #1001575DavidStaffCustomer SupportIt creates a shortcode:
[db_author_box]
Just add that to a HTML widget in your sidebar
September 5, 2019 at 12:08 pm #1002034SoumyadipThanks that is working.. but how can i bigger the gravatar image size and make it stand out in the center…as mentioned on that website
September 5, 2019 at 12:37 pm #1002053LeoStaffCustomer SupportCan you link us to the page where the solution is currently applied?
September 5, 2019 at 11:20 pm #1002317Soumyadipi am checking this in localhost.. i want something like this https://www.recipetineats.com/creamy-mushroom-pasta/
check the author box on the sidebar and after content…
What plugins or scripts they are using.. i think they are not using any sort of plugin for author box..i have checked the source code..
It must be some scripts for both sidebar and after content author box..September 6, 2019 at 3:43 am #1002414DavidStaffCustomer SupportRemove the shortcode from the widget.
Then:1. Make sure you have the Element module activated in Appearance > GeneratePress
2. Then Appearance > Elements > New > Hook.
3. Add the Shortcode in the content of the hook.
4. Select thebefore_right_sidebar_content
hook.
5. Check execute shortcodes
6. Set Display Rules to Posts > All Posts
7. Remove the CSS i provided earlier and add this:.author-box { text-align: center; padding: 0 20px 20px; margin-bottom: 20px; background-color: #f6f5f3; margin-top: 70px; } .author-box .avatar { position: relative; top: -20px; margin-bottom: -20px; } .author-box .avatar img { width: 100px; border-radius: 50px; vertical-align: middle; } .author-box .author-title { font-size: 18px; font-weight: bold; margin-top: 0.5em; margin-bottom: 0; } .author-box .author-summary, a.author-link { font-size: 13px; } .author-summary a.author-link { padding: 6px 12px; border-radius: 24px; text-transform: uppercase; }
September 10, 2019 at 1:33 am #1005459Soumyadipit is working but looking very ugly…
See the sidebar – i.is.cc/2iG1MNuk.pngI have also added a hook for the after content and look at this
See after content – i.is.cc/2iG4FuD4.pngI want the image to be bigger on center-left of the box the name and description towards the left (after content)
and bigger image on the top center of the box then name and description centered aligned (for sidebar one)
You can also tell me if there is any way to add custom image other than gravatar
September 10, 2019 at 4:56 am #1005605DavidStaffCustomer SupportI built the code in a test site and it works fine, which means something else is interfering with the CSS. Really need to see the site to resolve the issues. Can you push the local site to a server so we can view. Otherwise we cannot advise.
January 20, 2020 at 2:16 am #1137582newmedianewpeople.comI can’t get this procedure working can you help me?
I would also like “author box” in the sidebar
but using an image of the author uploaded in “media”. How can I do ?January 20, 2020 at 3:26 am #1137666DavidStaffCustomer SupportHi there,
this link provides 2 sets of code:
https://gist.github.com/diggeddy/c448f642993866f79dbb960cbc450a6a
The
<?php
is added like so:
https://docs.generatepress.com/article/adding-php/The second part of the code is CSS, copy everything except for the
<style></style>
tags in to the Customizer > Additional CSS.You can then add a HTML widget containing this shortcode:
[db_author_box]
to a sidebar widget.How may authors will your site have ?
January 20, 2020 at 3:40 am #1137683newmedianewpeople.comperfect works on the single post
https://marcogiangrande.it/la-postura/ (HURRA’ !!! )but creates an empty box on the other pages
(example) https://marcogiangrande.it/piede/I do not understand why
January 20, 2020 at 3:52 am #1137693DavidStaffCustomer SupportThe code is designed only for Single Posts where the Author Meta would exist.
Will the site only have one author ? If so it would be easier to just use HTML to display the author box in the sidebar.January 20, 2020 at 3:55 am #1137694newmedianewpeople.comwill have a single author so I need a “practical” solution to insert the author box where it is needed. Thanks for your patience
-
AuthorPosts
- You must be logged in to reply to this topic.