paddywinz
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Admin, analytics, marketing screens blankI’ve just rolled back to v5.7.1 and that seems to have fixed it.
Forum: Plugins
In reply to: Showing Categories from Custom Post TypeIs there anyone that can help?
Forum: Fixing WordPress
In reply to: Showing the excerptThank you so much for the heads up. Not delved this deep into php/WP before.
For anyone else that is stuck.
This is my amended code.
https://pastebin.com/BpC8Yb8iForum: Fixing WordPress
In reply to: Anchor points from page titles to post content in pageThank you so much for the reply guys.
The culprit was having spaces in the title of the posts.
My next problem is using jQuery to smooth scroll to the anchors.
I have removed my scroll class because when it was originally in there, the closing title tag would stop scrolling to the anchor.
My current code is now:
Thisand I have my jquery script in my footer:
<script> $(".anchor").click(function(event){ event.preventDefault(); //calculate destination place var dest=0; if($(this.hash).offset().top > $(document).height()-$(window).height()){ dest=$(document).height()-$(window).height(); }else{ dest=$(this.hash).offset().top; } //go to destination $('html,body').animate({scrollTop:dest}, 2000,'swing'); }); </script>
Currently I have this at line 17:
echo "<li><a href='#$post_title' title='$post_title'>$post_title</a></li>";
But to trigger the script I need to give it a class like so:
echo "<li><a class='anchor' href='#$post_title' title='$post_title'>$post_title</a></li>";
When I use this it stops scrolling to the anchor.
Forum: Fixing WordPress
In reply to: Anchor points from page titles to post content in pageThanks for the reply Robin,
However it still isn’t working.
The website in question is:
https://www.liftconsultancy.com/lift/strategic-leadership/Anyone else?