Archived topic
Homepage links everywhere to page 2 after insert 11th article
17 replies · Started by Daniele on March 21, 2021
Hi, I've just published my 11th article and the homepage don't work properly.
Except the top bar everywhere you click send you to home/page 2, and in page 2 everywhere links to home.
I use few plug ins and few GP elements.
If I transform the 11th article in draft, it's all back ok!
I can't understand!
Glad if you can help me or I should stop publishing articles to 10 :-)
This is the website:
Thanxs a lot in advance,
Daniele
now I tried to increase the number of post visible in home to 11, and of course it's ok.
But as I will publish the next post it will be again in that way!
When tou can answer I will revert the number of posts to 10.
Hi there,
Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?
Let me know :)
I can try, but I don't know if this will make problems, for example
code snippets or
Recent Posts Widget With Thumbnails or others
Now I reverted to 10 post so you can see the problem.
I'm a bit scared of turning them off.
But if you tell me there will be no serious problems... I'll do. :-)
The theme itself cannot cause an issue like this.
You will need to try disabling all plugins to test this.
If this doesn't help, does the issue exist in a Twenty series WP theme?
now all plugs off except GP premium
it's all the same...
Changing theme?
no, it happens only in the upper part of the page, until the title of the last post
You can keep GP Premium disabled as well and make sure you are not using any custom functions (activate the parent theme).
If that doesn't help, then yes try a Twenty series WP theme.
when I deactivate GP premium the 2nd page link remained in the upper part of the page.
now I put twenty theme and it's ok.
So what do you think?
I'm scared!
Anyway thanks
Daniele
the only thing I added to dthe theme css it's this code.
Maybe I took from some GP forum topic, I don't remember.
But it was only for the navigation after the post
/* aggiunti da me */
/* Post Navigation */
#nav-below,
.nav-previous,
.nav-next,
.post-title-wrap {
display: flex;
width: 100%;
}
#nav-below {
justify-content: space-between;
}
#nav-below img {
max-width: 100px;
max-height: 100px;
object-fit: cover;
}
.nav-previous,
.nav-next {
width: 49%;
margin: 10px 0;
position: relative;
box-sizing: border-box;
}
.post-title-wrap {
padding: 10px;
width: 100%;
flex-direction: column;
border: 1px solid #efefef;
}
.nav-previous .post-title-wrap {
text-align: right;
}
#nav-below a:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.title-label {
font-size: 12px;
}
.nav-previous:hover .post-title-wrap,
.nav-next:hover .post-title-wrap {
border: 1px solid #ccc;
}
@media(max-width: 758px) {
#nav-below {
flex-direction: column;
}
.nav-previous,
.nav-next {
width: 100%;
}
}
I discover that the problem was in this CSS above.
I insert the Css to make the post navigation left and right under the post text.
Is there any other method to do this?
with CSS https://ibb.co/m5045BG
without CSS https://ibb.co/ZKpYYsB
Thanks in advance Leo!
Now sleep time, I will check tomorrow.
Daniele
Make sure to use David's full solution here:
https://generatepress.com/forums/topic/post-navigation-with-clickable-thumbnails/#post-1523670
I followed exactly that solution:
1- snippet with php in CODE snippet plug in
2- CSS in the theme CSS
I tried to put the CSS into Simple CSS instead of the Theme CSS.
Same result!
Always link to page2!!!
I don't know what to do!
Is it possible to tell to the CSS to work everywhere except the homepage?
Or only into the post pages (where I need the post nav)?
But maybe now it's night for you!
Daniele
PS
I disable the Css script in few minutes, so the site is ok to navigate!
Hi there,
can you re-add the CSS to the very top of your CSS ( ie. before any other CSS ) and let me know so i can see what the issue is.
Hi David, I activate again the simple Css with the code above. It's the only code it contains.
And of course the theme CSS is empty.
Now you can see the issue: link to home page2. When you go to page2 -> link to page1.
I have only other 3 snippets, but they only have php and they work properly.
Thanks,
Daniele