- This topic has 15 replies, 3 voices, and was last updated 4 years, 7 months ago by David.
-
AuthorPosts
-
September 8, 2019 at 3:39 pm #1004318Karel
Hi,
I would like to ask you for help with Spacious theme.
1) I cannot find a file for Homepage / Blog, so I could edit things through elementor or use WP show posts.
2) I would like to have white hover over row after clicking on the Search icon.
3) Is there any Plug-in which creates an active button? I would like to place one in Header and after clicking it would scroll down on posts.Thank you for your patience and help đŸ™‚
September 8, 2019 at 3:58 pm #1004332LeoStaffCustomer SupportHi there,
1. The home page is the posts page so it’s automatically generated by WordPress.
If you want to use Elementor or WP Show Posts, you can just create a new static page and assign it under WordPress Readings settings:
https://wordpress.org/support/article/settings-reading-screen/2. Try this CSS:
.navigation-search input[type="search"], .navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus { background-color: #ffffff; color: #000000; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
3. You could add a button in the header element using HTML:
https://docs.generatepress.com/article/adding-buttons/Then use our smooth scroll script:
https://docs.generatepress.com/article/smooth-scroll/Let me know đŸ™‚
September 9, 2019 at 5:00 am #1004654KarelHello Leo,
Thank you for the code it is working perfectly, but I cannot figure out the smooth-scroll feature on a button, I put one in the header on Main Page and after clicking I would to smooth scroll on first 2 ( or any other post ).
I don’t know where to place class=”smooth-scroll” as I cannot edit MainPage code.
Thank you đŸ™‚
September 9, 2019 at 6:28 am #1004703DavidStaffCustomer SupportHi there,
Smooth Scroll only works with anchor links on the same page, they won’t work if you’re navigating to a new page.
The
smooth-scroll
class is added to the Link/Button not the anchor e.g<a href="#jumpto" class="smooth-scroll">Smooth Scroll to somewhere"</a>
Then the element it jumps to for example a heading:
<h2 id="#jumpto">This is where it the link takes me</h2>
September 10, 2019 at 5:13 am #1005625KarelHello David,
That I know
Smooth Scroll only works with anchor links on the same page, they won’t work if you’re navigating to a new page.
I just want to make a button on main page in the header and after clicking it will scroll on posts, but I cannot find a way how to edit the home page. Since I dont have any in Pages.
September 10, 2019 at 5:29 am #1005643DavidStaffCustomer SupportSorry my bad đŸ™‚
You can add the HTML for your button in the Header Element or use a Hook Element to add it elsewhere:
https://docs.generatepress.com/article/hooks-element-overview/
Visual Hooks:
https://docs.generatepress.com/article/hooks-visual-guide/
When setting the display rules for your Hook you need to choose the Front Page location for it to show on the Home
September 11, 2019 at 3:07 am #1006561KarelOkay, I managed to do it through a hook thank you and can you explain to me now where I should put this snippet? Please.
add_filter( ‘generate_smooth_scroll_duration’, ‘tu_smooth_scroll_duration’ );
function tu_smooth_scroll_duration() {
return 800; // milliseconds
}So I can slow it down a lot:)?
September 11, 2019 at 5:43 am #1006641DavidStaffCustomer SupportThat is a PHP Snippet so this article explains:
September 11, 2019 at 3:20 pm #1007193KarelWell, I used CodeSnippet, copied code there.
add_filter( ‘generate_smooth_scroll_duration’, ‘tu_smooth_scroll_duration’ );
function tu_smooth_scroll_duration() {
return 40000; // milliseconds
}Activated. Yet not slowed down.
September 11, 2019 at 3:57 pm #1007213LeoStaffCustomer SupportI would think 40000 milliseconds is over the upper limit.
40 seconds smooth scroll is quite slow and not very common.
September 12, 2019 at 3:34 am #1007474KarelWell, it was more like testing if it was working, even when I set it like on 1000ms it does not work.
I really don’t know where could be the problem, all I want is just a nice smooth(slow)-scroll from the header to first 2 posts at Homepage after clicking on the button in the header.
this is code for the button:
a class=”button” href=”#jumpto” class=”smooth-scroll”
code for an anchor:
<span id=”jumpto”></span>
And code in the code-snippet plugin:
<?php
add_filter( ‘generate_smooth_scroll_duration’, ‘tu_smooth_scroll_duration’ );
function tu_smooth_scroll_duration() {
return 3000; // milliseconds
}September 12, 2019 at 4:03 am #1007501DavidStaffCustomer SupportCan you re-add the smooth-scroll. And the filter snippet. Then i can take a look.
September 12, 2019 at 5:37 am #1007570KarelWhat do you mean exactly? Re-add it is still there at the website , I have not changed anything.
September 12, 2019 at 5:40 am #1007573DavidStaffCustomer SupportI am looking at your Home Page – there is a Scroll Down button in the Header Element – which has no scroll-down class applied to it ?
September 12, 2019 at 3:35 pm #1008215KarelIm an idi.. sorry I have realised why it didn’t work the whole time because I had two classes in that code
class=”button” href=”#jumpto” class=”smooth-scroll”>Scroll down
So I have just moved smooth-scroll to button class.
Problem Solved, thank you David and Leo for patience and help (y) -
AuthorPosts
- You must be logged in to reply to this topic.