Show Pods Custom Fields Editor when a page is using a specific template in WordPress

This will remove the meta box for a Pods field group called ‘More Fields’ from the editor for a page not using a certain page template: // remove meta box if page does not use a certain page template add_action(‘admin_head’, function() { $template = get_page_template_slug(get_queried_object_id()); if(‘my-page-template.php’ !== $template) { remove_meta_box(‘pods-meta-more-fields’, ‘page’, ‘normal’); } });

How to use orderby on meta_value when using Pods custom database table storage

As with any custom tables in your database, you can override the SQL that WP_Query ends up using. For this use case, I’d suggest not using WP_Query’s arguments and building your own function to do this instead as it could simplify the logic and complexity. <?php add_filter( ‘posts_clauses’, ‘my_custom_wp_query_posts_clauses’, 10, 2 ); /** * Custom … Read more

Can’t create new Pods pages

I found the problem. There was a line of code that was deleting all posts as soon they were created. It may seems slly but it was wanted, I’m building a really custom app based on wordpress… Simply I forgot that this would cancel many other things that pods saves as post, like pods pages … Read more

tech