Home Forums Smarty – Education WordPress Theme News on Homepage – pagination doesn't work !

Tagged: , ,

This topic contains 7 replies, has 2 voices, and was last updated by  Axel 7 months, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4203

    harlowpl
    Member

    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 😊

    #4206

    Axel
    Moderator

    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

    harlowpl
    Member

    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.

    #4226

    Axel
    Moderator

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

    Regards

    #4299

    harlowpl
    Member

    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.

    #4312

    Axel
    Moderator

    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

    harlowpl
    Member

    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

    #4325

    Axel
    Moderator

    Thank you for your information!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.