This topic has 5 replies, 2 voices, and was last updated 7 years by Radu.

  • Author
  • #144908
     ccrawford
    Participant

    Hello, we’re using VC through the Kleo theme, and I’d like to be able to use pagination in a custom query in a post grid. Without the pagination option, we will just have a long grid full of posts. There is no option through the interface for pagination in a custom query.  I can’t find any information through Visual Composer. Any suggestions?

    #144930
     Radu
    Moderator

    Hi,

    Please take a look here : https://archived.seventhqueen.com/forums/topic/visual-composer-custom-query-pagination/#post-144886

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #144935
     ccrawford
    Participant

    Thank you for the quick response. Unfortunately that won’t work as I need to query across multiple post types. Is there really no way around this? I am comfortable editing php if needed.

    #145024
     Radu
    Moderator

    Hi,

    That it’s part of Visual Composer and if you will modify that file on the plugin update that file will be overwritten /wp-content/plugins/js_composer/include/templates/shortcodes/vc_posts_grid.php

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #145396
     ccrawford
    Participant

    Thank you. That wasn’t quite the right location, but editing these two files seemed to do the trick. I hope this helps someone else, and I hope VC makes this possible in a future version.

    /wp-content/plugins/js_composer/include/classes/shortcodes/vc-basic-grid.php
    comment out line 351 (this no longer forces custom queries to show all)

    /wp-content/plugins/js_composer/config/grids/class-vc-grids-common.php
    comment out lines 204 and 205 (this allows display style as an option)

    #145412
     Radu
    Moderator

    Hi,

    Thank you for completing this providing additional paths

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Plugins questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?