Tagged: blog posts
-
AuthorPosts
-
July 30, 2021 at 5:52 pm #1313500
Hello,
I’m trying to get the blog post pagination to work well with other elements that are embedded in the same page. I noticed that there is a mention that pagination might not work well when there’s more than 1 blog post element on a page, but currently I only have 1 blog post element and am still having some issues.
I was hoping that by clicking on the pagination (under the resources section) that the next page of the blog would either load within the same frame / color section (without the rest of the page loading) or if the whole page needs to reload, that it would load back to the same location down the page, so that the visitor wouldn’t have to re-scroll down back all the way down. Additionally, is it possible to share the css selectors that I can use to style and edit the pagination buttons?
On another related note, I was wondering how I could remove the blog preview images from the posts specifically for the page linked below. Guessing this probably has to be done through quick CSS since this is in the “Grid Layout” Blog styling, there is no option for me to just show the title, categories, exerpt and read more link.
Thanks!
Joe
July 30, 2021 at 10:51 pm #1313520I found this old support posting (https://kriesi.at/support/topic/anchor-blog-pagination-to-same-page-location/) and added to my child theme functions.php but it doesn’t seem to be working for me. I tried changing the # to match with the developer id in the color section but no luck for some reason.
Another related question, is it possible to hide the categories text underneath the post title on just the one page that I linked in the post above?
Thanks again,
Joe
August 4, 2021 at 5:02 am #1314243Hi,
Thank you for the inquiry.
Did you apply the ID “home-blog” to the color section containing the blog? What the script does is append the anchor #home-blog to the pagination links, so whenever you click a pagination, it will go straight to the destination anchor or the color section with the ID “home-blog”.
Best regards,
IsmaelAugust 4, 2021 at 7:07 pm #1314457Hi Ismael,
Yes that’s exactly what I’ve done, except I’ve used the ID “resources-blog” for both the function and the color section. However, this still doesn’t have the desired effect of getting the blog color section to display on top when the pagination button is clicked. Please find the information about the specific webpage, blog section, and temp login in the private section below.
Also, as per my previous posts, how can I remove the preview images and category text from only this gallery section portion of the blog posts?
Thanks,
Joe
August 6, 2021 at 9:44 am #1314778Hi,
Thank you for the info.
We cannot find the script in the functions.php file. Where did you add the function?
Best regards,
IsmaelAugust 10, 2021 at 4:46 pm #1316104Hi Ismael,
Please find the screenshot of the script in the enfold child – functions.php in the link below.
Best,
Joe
August 13, 2021 at 7:17 am #1316549Hi,
Thank you for the info.
It might not be working because of the load function, which is no longer valid. Please try to replace the code with the following snippet.
function ava_custom_script_pagination_anchor(){ ?> <script> (function($) { $(document).ready(function(){ $("nav.pagination a").each(function(){ var theLink = $(this).attr("href"); $(this).attr("href", theLink + "#home-blog"); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_pagination_anchor', 9999);
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.