Christophe
Forum Replies Created
-
Regarding the pagination-active issue, the problem seems to come from assets/js/ultp.js, line 231-243.
if (that.hasClass('ultp-prev-page-numbers')) { pageNum = Number(parents.attr('data-paged')) - 1 parents.attr('data-paged', pageNum).find('li').removeClass('pagination-active') //parents.find('li[data-current="'+pageNum+'"]').addClass('pagination-active') serial(parents, pageNum, pages) showHide(parents, pageNum, pages) } else if (that.hasClass('ultp-next-page-numbers')) { pageNum = Number(parents.attr('data-paged')) + 1 parents.attr('data-paged', pageNum).find('li').removeClass('pagination-active') //parents.find('li[data-current="'+pageNum+'"]').addClass('pagination-active') serial(parents, pageNum, pages) showHide(parents, pageNum, pages) }
Lines 234 and 240 should be removed (as in the code above). Adding the “pagination-active” here is redondant (and misfunctioning?) as it is already covered by the
serial
function.Hello,
Coming back on one of the issue described in this topic regarding the “<” (Previous arrow) not showing up.
I definitely think something is wrong in classes/Functions.php, line 126-128 (inside the definition of the pagination function).
if($pages > 4) { $html .= '<li class="ultp-prev-page-numbers" '.($paged==1?$display_none:"").'><a href="'.get_pagenum_link($paged-1).'">'.ultimate_post()->svg_icon('leftAngle2').' '.($paginationNav == 'textArrow'?__("Previous", "ultimate-post"):"").'</a></li>'; }
I do not think there is any reason justifying the condition
if($pages>4)
here. On the contrary, if the condition exists, if your page number is <= 4, then the button is never shown (Ajax does not “add” any button but change the “style” attribute).If you remove this condition, the button is in the HTML code but in “display:none” while you are on the first page. Then when you go to a page>1, the button appears. This should be the correct behaviour.
NB: Still investigating why but there also seems to be a problem with the “pagination-active” class when you arrive on the before last page with the arrows. Then both the before last page and the last page have a “pagination-active” class.
Hi. I am glad to report the issue is fixed! Thanks.
Forum: Plugins
In reply to: [wp-Typography] Smart Dashes with French words containing multiple dashesThanks a lot!
Yes, that’s it. It is not visible with the font used on this forum, but if you look at the source of the page (with a monospace font) it is easier to spot the difference.
- Go to
Admin panel > Post Blocks > General settings
- Change the settings (e.g. “CSS added via” file system, “hide import button” checked”)
- Save the modifications
- Browse wherever you want on your website
- Go back to
Admin panel > Post Blocks > General settings
. The settings are still correct, as modified in step 2. - Now, try to edit an article or a page. Notice that on top of the page the blue “Import button” is displayed while we checked the item to hide it in step 2.
- Go back to
Admin panel > Post Blocks > General settings
. Now the settings are back to the default configuration (i.e. “CSS added via header”, “hide import button” unchecked). If you look at the source of a page, you can also notice that CSS for ULTP is indeed directly added in the page, just before</head>
.
Forum: Plugins
In reply to: [wp-Typography] Typo in figcaption (featured image)Thanks for the quick reply. So apparently the bug was known. ??
I really appreciate your suggestions to fix the problem, but I will choose the easiest one: keep it as it is! After all, that’s not a big deal and overall this plugin is still super efficient.
Resolved.
Isn’t this the same issue as in https://www.ads-software.com/support/topic/pagination-with-offset/ ?
Thanks for your reply. Here are some pictures to illustrate the problem.
– Page 1 of the grid: https://www.ahmontour.com/bug/postgrid1_page1.png
The articles shown are posts #2 to #10, which corresponds to the 10 latest posts except the very latest (query : 9 posts with an offset of 1 post). Expected behaviour, everything is fine!
– Page 2 of the grid (top): https://www.ahmontour.com/bug/postgrid1_page2_top.png
The articles shown are posts #10 to #19. You can notice that the first article shown is the same as the last article shown on the first page. This is not the behaviour I would expect. The offset is not taken into account anymore.
– Page 2 of the grid (bottom – pagination): https://www.ahmontour.com/bug/postgrid1_page2_bottom.png
You can see that, although being on page 2, the “<” (previous) button does not appear. On page 3 (last page), the “>” (next) button disappears which is expected but there is still no “<” (previous) button. One can still navigate through the pagination though by clicking on the page number.
– fwiw, grid config (query+pagination): https://www.ahmontour.com/bug/config_plugin.png
Hope it helps replicating the issue!
Christophe.(Btw I also notice that when navigating through the pagination, the “Next” button displays correctly but not the “Previous” button which is never shown on the real page – while it appears on the Gutenberg page editor.
It it though still possible to click on the page numbers so not a big issue atm.)
- Go to