Couple of things perhaps spring to mind – when using add_action
you’ll need to provide how many of the arguments you’re planning on using. Default 1. You’re not using request info so get rid of that. Second bit geodir_get_current_posttype()
link
Read through how the function works and make sure it makes sense and would work in the context you are using it. It looks like it reads a query var from the URL – is that there?
Another option could just be to look this up yourself – looks like you’ve got the $last_post_id
variable. Can you not find out the info you need from that?
Plenty of var_dumps and die can help you diagnose what you’re missing. Looks like the plugin author leaves most of them in the code anyway!
Related Posts:
- allow editors to edit menus?
- How to change a user’s role?
- Is there way to rename user role name without plugin?
- How to create a clone role in wordpress
- How to add a Capability to a User Role?
- How can I get a list of users by their role?
- How to get role of user
- How to allow editor to edit privacy page / settings only?
- How do I make a draft post accessible to everyone?
- Reset default roles and capabilities
- How do I programmatically set default role for new users?
- add_role() run only once?
- What do unfiltered_html and unfiltered_upload actually filter?
- wp_update_user not updating
- Temporary capability for current_user_can()
- Create custom user role (client) that can create another custom user role (employee) of that client
- Is it possible to add new user Roles?
- Allow roles below admin to add subscribers only
- Temporarily give ‘manage_options’ capability
- REST API, get user role?
- Is WordPress’ is_user_logged_in() secure?
- How to force listing contributors in authors dropdown menu
- Hide specific admin users’ posts
- Allow authors to edit only certain users
- How do I allow a specific Role in WordPress 3+ to only see certain plugins?
- How to update role capabilities
- Allow editors access to added plugins
- Temporarily disable user role login and replace with message
- How to filter the role selector?
- How to loop through each user id?
- Code needed to only show users own posts in a multi-user account
- How can I change a user role upon visiting a page?
- How to let the Contributor role preview unpublished posts?
- Change role after the user has read all the posts in a category
- Do custom user roles have any default capabilities?
- Filter available WooCommerce payment gateways by role [closed]
- Ordering users of a specific role by last name
- How to programmatically add a user to a role?
- Restrict Author to pick from media library, but not upload media
- Can i copy administrator role to another user?
- how to add custom user capabilities using add_user_meta or something else?
- Assign Subscriber capabilities to a custom user role
- How to change role of all users with a specific role to another role?
- Allow user to Publish, but not Edit or Delete
- Roles at registration (classipress)
- How to allow registered users to change their user role through frontend?
- Remove Ability for Administrators to Delete Administrators
- Order users by custom user meta
- how to change user roles for users who doesn’t have any. (about 8000 users)
- List total number of users that are authors
- Email notification for editors only
- Shold I manually add ‘cap’ to admin role ?
- Custom Post Type’s Capabilities map_meta_cap issues
- I need to assign a role to visitors/guests
- Contributors missing from author dropdown
- How to make an author archive only for certain user role and show related CPT
- Getting a user role from the user login name
- Allow users to publish child pages of the pages they have access to edit
- Auto Delete Users (auto_delete_users)
- New Roles and Capabilities in WordPress
- Why is wp-login redirecting to the home page when I use this function?
- Is there a way to set the user Role based on email domain
- Allow contributor to view own scheduled post
- Editor and contributor roles not correct after adding function
- Adding multiple user roles dynamically
- WordPress Super Admin
- pre_get_posts Remove posts based on meta value with ‘post__not_in’
- How to add author role as a custom field to custom post type in wordpress?
- How to prevent users with “edit_others_posts” capability from editing admin posts
- How are roles stored in the database?
- Author Role – Allow editing of Gallery images
- How do I allow anyone to edit a post — but not access dashboard
- What is the difference between “create_users” and “add_users” capabilities?
- How to delete user roles?
- Access on specific pages in wordpress for a specific user
- How to get all users with Author role capabilities?
- How to display user role
- Change the user role after x days
- Get (echo) all role names assigned to user
- How to ‘unpublish’ or ‘hide’ posts when user role changes?
- Can’t manage to make translate_user_role() work
- Add Role inherits?
- similar to Editor can create any new user except administrator
- Conditional Tags for Membership Levels when using Wishlist Member Plugin?
- How to check if a role has a specific capability
- I am adding a new class to my body tag if the logged in user is subscriber, need help
- Expire a user’s secondary role after X days from it being allocated
- Locking Down WordPress Application Password Permissions / Capabilities
- How to Orderby User Role?
- Users Role and Access
- Prevent custom user role to add new pages
- Allow user to edit specific user with meta key using map_meta_cap
- How to remove sticky post capability for a specific user role?
- Can a user with admin role get ‘Sorry, you are not allowed to move this item to the Trash’ error when trashing a post?
- Hide Specific User Page
- Making shortcode of filtered number of comments by user role
- Let new user role to ‘edit_others_posts’ of other user role, not of its own type
- How to stop contributors editing post type but allowing them to edit a custom post type?
- How can I have different groups of editors only allowed to edit certain parent+subpages?
- How to let someone preview a draft?