- This topic has 19 replies, 4 voices, and was last updated 3 years, 10 months ago by
Ying.
-
AuthorPosts
-
May 28, 2022 at 11:18 pm #2236596
Rohan Verma
Hello I want some help to customize my website
1) How to get this kind of homepage (both desktop and mobile)
2) How to put search to the left of logo on mobile devices?
3) How to put updated date under author name in single postMay 29, 2022 at 11:31 am #2237160Leo
StaffCustomer SupportHi there,
Let’s handle one question at a time and per topic:
https://www.screencast.com/t/BUPtnINQmWhich parts are you referring to here?
If it’s the layout of the posts, then the best solution would be to use the query loop block in the upcoming GenerateBlocks 1.5 which is currently in beta testing:
https://generateblocks.com/generateblocks-1-5-dynamic-data-query-loops-image-blocks/May 29, 2022 at 11:42 pm #2237498Rohan Verma
I need this one
How to put the search icon to the left of logo on mobile devices and hide the menu text (Only show the icon)?May 30, 2022 at 12:10 am #2237520Fernando Customer Support
Hi Rohan,
To remove the Menu Label, Kindly go to Appearance > Customize > Layout > Primary Navigation, then leave the Mobile Menu Label blank.
To clarify, the reference site you have has its Menu at the left, and the search icon at the right, is this the one you’re going for?
If so, here is a code you may add in Appearance > Customize > Additional CSS:
.site-logo.mobile-header-logo { position:absolute; top: 0; left: 50%; transform: translateX(-50%); } #mobile-header .menu-toggle { order: -1; margin-right: auto; }Otherwise, try this:
.site-logo.mobile-header-logo { position:absolute; top: 0; left: 50%; transform: translateX(-50%); } #mobile-header .mobile-bar-items { margin-right: auto; }Kindly let us know how it goes, and we’ll proceed with your next inquiry.
May 30, 2022 at 11:39 pm #2238759Rohan Verma
Thanks, everything works pretty well. Can you tell me how to increase the size of the menu icon and search icon on mobile only? and How to put updated date under author name in single post
May 31, 2022 at 12:18 am #2238803Fernando Customer Support
You may try adding the following code in Appearance > Customize > Additional CSS:
@media (max-width: 768px) { .main-navigation .mobile-bar-items a { font-size: 24px; } button.menu-toggle span.gp-icon.icon-menu-bars { font-size: 24px; } }With regards to the placement of the date on single posts, here is another CSS you may try adding:
body.single div.entry-meta { display: flex; flex-direction: column; } body.single div.entry-meta span.posted-on { margin-left: 30px; }Hope this helps!
June 1, 2022 at 4:55 am #2240149Rohan Verma
The icon size has been fixed. Thanks. The date issue is still there. The CSS is affecting the category portion as well. I just want the date to be under the author name.
June 1, 2022 at 5:45 am #2240189Fernando Customer Support
I see.
I edited the second code above: https://generatepress.com/forums/topic/some-customization-needed/#post-2238803
Kindly try using that instead.
This is how it should look like with the new code: https://share.getcloudapp.com/nOuXpP5v
June 2, 2022 at 6:24 am #2241324Rohan Verma
Nice, it worked. But I want the author’s image to align correctly like the example site. And I want “By” before the author’s name and “Updated on” before the Date.
ThanksJune 2, 2022 at 5:49 pm #2241894Fernando Customer Support
I see.
Kindly try adding this PHP:
add_filter( 'generate_post_date_output','tu_add_to_post_date' ); function tu_add_to_post_date( $output ) { return '<span class="date-label">Updated on </span>' . $output; }Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets
Then, update the CSS to something like this:
body.single-post span.byline a[rel="author"]::before { content:"By "; text-decoration: underline; color: #f5f7fa; text-decoration-color: #ff409d; text-decoration-thickness: 2px; text-decoration-style: solid; text-underline-position: under; } body.single-post div.entry-meta { display: flex; flex-direction: column; } body.single-post div.entry-meta span.posted-on { margin-left: 30px; }Hope this helps!
June 3, 2022 at 12:59 am #2242116Rohan Verma
Thanks, everything is now perferct. There is one issue I am facing while loading new pages wp show post featured images taking too much time to load and while loading those looks weird. Do you know what is the reason and how to fix? I have attached the video so that you can check that out
Thanks in advance.
June 3, 2022 at 1:34 am #2242140Fernando Customer Support
You’re welcome!
Are you using WP Rocket? You can try adding ?nowprocket at the end and see how the loading changes. It may have something to do with your optimization.
Or, if you test your website in https://pagespeed.web.dev/ you’ll see improvements you can work on which may positively affect your site’s loading speed.
Hope this clarifies!
June 3, 2022 at 2:33 am #2242197Rohan Verma
Yes using WP rocket. Could not get this “You can try adding ?nowprocket at the end and see how the loading changes”
Can you explain?June 3, 2022 at 2:36 am #2242203Rohan Verma
Get it what your are saying. I tried ?nowprocket but loading issue is still there. I am using custom image size for wp show post, can this be a reason?
June 3, 2022 at 10:10 am #2242694Ying
StaffCustomer SupportHi there,
You are using float CSS to make the layout, I wonder if that’s the reason.
Can you try add this CSS:
@media (max-width: 768px) { #wpsp-61680 .wp-show-posts-inner { display: flex; } }And remove
float: left;from this CSS:@media (max-width: 768px) .wp-show-posts-image.wpsp-image-left { float: left; margin-right: 0.8em; max-width: 100px; } } -
AuthorPosts
- You must be logged in to reply to this topic.