Title: Custom PHP not working
Last modified: October 31, 2020

---

# Custom PHP not working

 *  Resolved [samlaflam](https://wordpress.org/support/users/samlaflam/)
 * (@samlaflam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-php-not-working/)
 * Hi,
 * I’m trying to use your documentation’s[function to customise Tiles Gallery](https://visualportfolio.co/documentation/developers/wordpress-filters/#extend-tiles)
   and add more columns, but it seems to not working at all.
 *     ```
       add_filter( 'vpf_extend_tiles', 'my_filter_vpf_extend_tiles' );
   
       function my_filter_vpf_extend_tiles( $tiles ) {
           return array_merge( $tiles, array(
               array(
   
                   'value' => '6|1,1|1,1|1,1|1,1|2,1|2,1|',
               ),
   
           ) );
       }
       ```
   
 * I’m inserting snipet in my function.php and trying to play with values, but nothing
   happen frontend.
 * Once inserted the function, do I have to specify or choose something in particular
   in the plugin ?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13607108)
 * Hey.
 * Your custom tiles available in a predefined set:
 * [[
 * [[
 * Such layouts will be resized automatically depending on the screen and container
   width.
 * Regards, nK.
 *  Thread Starter [samlaflam](https://wordpress.org/support/users/samlaflam/)
 * (@samlaflam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13607260)
 * Hi,
 * Yes, I do have this custom layout item, but it seems that values in my function
   are not working.
 * For example I started with ‘value’ => ‘6|1,1|1,1|1,1|1,1|1,1|1,1|’ and it’s not
   what’s displaying front-end.
 * And if I replace ‘value’ with => ‘3|1,0.5|2,0.25|’ it doesn’t change anything
   front-end.
 * So I’m missing something here right ?
 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13621631)
 * Hey.
 * Maybe you can give an online example with your custom tiles layout? I can check
   it and better understand the problem.
 * Once you change the value in PHP, it will just change the predefined option. 
   Block will still have an option, that you selected before. To use the newly registered
   tiles, you need to open a portfolio editor and select it from the list.
 * Regards, nK.
 *  Thread Starter [samlaflam](https://wordpress.org/support/users/samlaflam/)
 * (@samlaflam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13634862)
 * Hi there, I got it, each time I have to update post and open a new portfolio.
 * Here is my last question : I’m trying to [reproduce this](https://snipboard.io/8dSkr4.jpg).
 * I succeeded to reproduce first raw with this : value’ => ‘6|2,1|1,1|1,1|1,2|1,1
   |’
 * But then I don’t know how to force second raw to be different and finish the 
   layout. You can [see it here](http://test.lesventsnousportent.com/plugins/).
 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13660277)
 * Hey.
 * It is a highly specific layout… you should configure all item sizes and limit
   the number of displayed items.
 * I have played with it, something like this one will work better: `6|2,1|1,1|1,1
   |1,2|1,1|2,0.5|1,2|1,1|2,0.5|1,1|1,1|1,1|`.
 * Regards, nK.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom PHP not working’ is closed to new replies.

 * ![](https://ps.w.org/visual-portfolio/assets/icon-256x256.png?rev=2389881)
 * [Visual Portfolio, Photo Gallery & Post Grid](https://wordpress.org/plugins/visual-portfolio/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/visual-portfolio/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/visual-portfolio/)
 * [Active Topics](https://wordpress.org/support/plugin/visual-portfolio/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/visual-portfolio/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/visual-portfolio/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [nK](https://wordpress.org/support/users/nko/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/custom-php-not-working/#post-13660277)
 * Status: resolved