• Resolved justinghill

    (@justinghill)


    Right now I have about 118 galleries, of which I’m guessing about 100 are displaying on the homepage at a time. I didn’t know there was a cap on that…is there a way to tweak this? please advise…
    https://ilovegriffithpark.com/

    ps I bought the horizon theme but didn’t use it yet, if that helps get an answer ??
    -Justin

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter justinghill

    (@justinghill)

    On second thought, a wonderful feature to add would be to be able to set the maximum number of galleries to be displayed per page, and then a load next “x” amount button, or a next page, button…
    https://ilovegriffithpark.com

    Plugin Support Tanita

    (@tanitap)

    Hi Justin,

    You’re right, the plugin is set to a maximum of 100 galleries. We limited the number because it’s pretty hard for a page to load more than that (actually loading 100 galleries challenging already.)

    If you need only 18 more then you can use this piece of code:

    
    <?php
    
    add_action( 'pre_get_posts',
    	function ( $query ) {
    		if ( function_exists( 'phort_is_archive' ) && phort_is_archive() ) {
    			$query->set( 'numberposts', 150 );
    			$query->set( 'posts_per_page', 150 );
    		}
    	},
    50 );
    

    You will need to create a child-theme and then paste the code inside “functions PHP” file.

    But the best solution in your case would be to hire a developer who could add “lazy load” so that all galleries would load gradually while the user is scrolling.

    Good luck ??

    Thread Starter justinghill

    (@justinghill)

    hi tanita,
    thank you for getting back to me with assistance. That code did not work for me, would you mind double checking it please?
    Thank you! ??
    Justin

    Thread Starter justinghill

    (@justinghill)

    Hi again!
    Never mind, I’m not sure if there is any reason not to do it this way, but I found that relative code in your plugin and just edited that value there, inside the “query” file. I hope that is ok, I’m brand new to this. thank you again though, and let me know if for some reason this is bad.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Maximum number of Galleries displaying’ is closed to new replies.