How do I add a menu item to a Pods admin menu?

To add submenu items to a specific Pod’s menu, try this: add_submenu_page( ‘pods-manage-your_pod_name’, ‘My submenu item page title’, ‘My submenu item’, ‘manage_options’, ‘pods-manage-your_pod_name-my-submenu-item’, ‘your_callback_function’ ); Do this during the admin_menu action in WordPress, or alternatively do it during the ‘pods_admin_menu’ action.

Allow Users to Modify Some Values of Assigned WordPress Pods [closed]

You can use map_meta_cap() to set more specific capabilities for your CPT. So instead of using the built-in edit_posts and edit_others_posts capabilities you would create edit_locations and edit_others_locations – thus allowing a new custom role to edit their own locations, but not edit_others_locations. You may find this related question helpful: Using Custom Meta Capabilities on … Read more

Dynamic redirect

Already solved using this code inside functions.php: add_action(‘template_redirect’, function() { if (is_single() && get_post_type(get_queried_object_id()) == ‘sorteio’) wp_redirect(‘edicao/?id=’ . get_queried_object_id()); });

Custom Post Type “MUST NOT” be able to search via URL

Welcome! After creating a post type using pods, You can navigate to Advanced options and uncheck Public and Publicly Queryable. Note: There are parameters like exclude_from_search, publicly_queryable, show_ui, and show_in_nav_menus that are inheriting value from public. You need to set them manually if you want to use them. More info: https://developer.wordpress.org/reference/functions/register_post_type/

How to add a sub directory to WordPress single posts without affecting other post types?

If we look at the register_post_type documentation, in the rewrite option, there is a sub-option that controls this: ‘with_front’ => bool Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true So something like this: … ‘rewrite’ => … Read more

WordPress different templates for same type custom post (but different slug)

In this case, since there’s a many-to-many relationship between movies and actors, I recommend making them two separate pods with a relationship between them. See the intro video at https://pods.io/ … I don’t remember where he explains relationship fields but it’s all in there. You don’t need to use PHP if you don’t want to. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)