Archived topic
Imprint - Next Previous Buttons Hook
18 replies · Started by FunkyCss on March 24, 2020
Hi , i would like to create the Next - Previous style on my ecommerce site like it is in Imprint , i find it really cool and modern .
So i have created the Hook like it is in Imprint
I have inserted the Css but it will not work .
When i activated the imprint in a new install it worked 100% , but if i copy the hook and the css and paste it to my other site it will not show anything !
Should i do something more than just that hook and its css ?
Hi there,
can you link me to your Site, so i can take a look ?
Hey David ! Yes i have updated the link and removed coming soon .
I have created the hook like the imprint
have add the Css code !
odd - the hook is working as i can see the prev_next container it displays. But it is empty which means the links function is not working.
Can you share the exact code you have in your Hook Element ?
Hi David thank you for checking this
<?php
echo '<div class="prev_next_buttons">';
$previous = next_post_link('%link', '←');
$next = previous_post_link('%link', '→');
echo $previous;
echo $next;
echo '</div>';
?>
Hooked to all products
Execute PhP
Disabled all other plugins and not working still -
The code looks fine and is working on my test site.
Maybe a plugin is interfering with the function ?
Hi David ,
I tested a million times , and i noticed that it will play to all templates except MERCH .
Merch uses three hooks on the Single Product, the Jump to Description, the social shares and adding the sidebar below the summary. I wonder if either of them are interfering ?
I have removed Jump to Description and social shares .
I have tested it with installing Merch and the next previous does not work , when i enable any other template it works !
i will find what actually is the issue , maybe something with css or other hooks ? i will go deeper and i will inform if some one is interested to implement this in Merch template
More likely to be the Sidebar that is hooked in - did you try removing that ?
Hi , Yes i have removed that too actually , but i have added a CTA before footer to all pages with some text , i will remove it and remove all css to check if this is the issue , cause it does not makes sense , the php you have added it works everywhere except with the merch template , so there is the issue .
I belive i am near to solve that , and it would awesome i like that next previous as you have implemented :)
Its very odd - can't see what differs on Merch - apart from those hook elements. Be good to hear what you find :)
Hi David so i finally Figured out why Next - Previous Buttons are not showing on some templates as they are conflicting with BLOG addon .
So i used your code `<?php
echo '<div class="prev_next_buttons">';
$previous1 = next_post_link('%link', '←');
$next2 = previous_post_link('%link', '→');
echo $previous;
echo $next;
echo '</div>';
?>
`
And added it to my site with all the stuff you have fixed etc.
When i activate BLOG addon they will not be displayed , when i have BLOG addon disabled they will work in woocomerce products , any solution to this one ?
This one will happen only when you have onother template like merch with the blog addon opened . i believe there is some comflict with the options there , i will give it a try with all options reseted in blog or with the custom elements for the blog display .
I will back asap
So i have disabled all css all other elements even plugins and left BLOG Addon - > https://imgur.com/khJ31cp ( Not Working )
Removing Blog Addon - > https://imgur.com/8DvkVJn ( Working)
Even if i remove settings from blog will not show up with the blog addon