• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Divine Theme

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Divine Theme

This topic is: resolved

Tagged: Divine theme, WooCommerce

  • This topic has 4 replies, 2 voices, and was last updated 6 years, 9 months ago by julian_s.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 22, 2019 at 5:24 pm #490797
    julian_s
    Participant

    Hi php 7.2
    Warning: create_function() is deprecated in functions.php
    From this line of code:
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 12;' ), 20 );

    Any suggestions for a fix for PHP 7.2 ?

    April 22, 2019 at 11:32 pm #490802
    Brad Dalton
    Participant

    Try this in functions.php

    add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 );
    
    function new_loop_shop_per_page( $cols ) {
      $cols = 9;
      return $cols;
    }
    

    Tutorials for StudioPress Themes.

    April 23, 2019 at 5:09 am #490813
    julian_s
    Participant

    Thanks for the response, still gives me the deprecation warning after adding to functions.php

    April 23, 2019 at 6:01 am #490817
    Brad Dalton
    Participant

    No warning when i test it.

    Please contact WooCommerce if you have any further problems.


    Tutorials for StudioPress Themes.

    April 26, 2019 at 4:22 am #490872
    julian_s
    Participant

    The error I believe is related to the version of php used and likely should be upgraded in the theme. I am not using Woocommerce so I just commented out the filter. Thanks for your help.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Divine Theme’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble