News on Homepage - pagination doesn't work !

Started by: harlowpl May 26, 2017 - 11:44

Hi,

I imported Primary school demo. I was changing Home3 page and with VC added a row with STM Posts (list, 5 post displayed, pagination: on). I had 7 News (5 display in first page, 2 in second) - everything works fine while I set Home3 as static Homepage in Wordpress settings. After that pagination doesn't work. When I click second page - url change to "../page/2", but it's still 5 posts from first page, not 2 posts from second page (default border on pagination box stay in box nr 1 what means it's still active)

I could fix it when I set Page with News on Wordpress settings as a Homepage, but then I don't know where I can change this page.

News must be on the Homepage! because my client requires it

heeelp heeelp 😊



Replies:

  • Author Team
    #4206 Reply

    Axel
    Hi,

    Unfortunately, pagination doesn't work on Wordpress static page by default. It needs to include extra scripts and styles in order to enable it. Also, you can use an extra plugin such as Infinite-Scroll.

    Regards

    #4220 Reply

    harlowpl
    Thanks for the reply Axel :)

    I did not realize it. Unfortunately, the Infinite-Scroll plugin does not fit my client. I will try with these extra scripts, but first I want to make sure can I edit the look of the news page with VC (news page setting in Wordpress settings as a Homepage). That's my second idea in my first post.

    Author Team
    #4226 Reply

    Axel
    In that case, you need to modify STM Posts module also in order to realize your request.

    Regards

    #4299 Reply

    harlowpl
    So, how to do it? :) or where ?

    In Wordpress settings I set "Page with news" as homepage now (not a static page). Pagination works fine. I found how to change sidebar with VC, but i want the same for footer (also by VC, NOT widgets). In addition I want to hide page title "News" and breadcrumbs and replace it like every single normal page using VC, with slider revolution for example.

    Author Team
    #4312 Reply

    Axel
    Sorry, but we can't include a developer for custom issues, as item support doesn't include customization service. You can find needed file in this folder "...\wp-content\themes\smarty\vc_templates\. Also, when you set your page as Post Page, Wordpress displays that page as default archive page. Therefore, it is not possible to edit the content of post page. You need to set another page as Post Page or create a different page with Sidebar and Slider Revolution module.

    Regards

    #4317 Reply

    harlowpl
    Problem solved! It turned out to be quite popular in other forums and almost every one came up with one solution. It is about :

    The clue being that get_query_var ('paged') is used to get the pagenumber everywhere except exactly on the static front page. There you use get_query_var ('page'). This was implemented this way since WordPress 3.0.2.

    I checked the file "... \ wp-content \ themes \ smarty \ vc_templates \ school \ stm_posts.php". I deleted the letter "d" with "paged" and the pagination works !!! :)

    Thank You for your time !
    Regards

    Author Team
    #4325 Reply

    Axel
    Thank you for your information!
You must be logged in to reply to this topic.