Not a direct answer, but two suggestions.
First of all, get_last_numero does not necessarily return the highest number. It returns the last one. If you have full control over insertion then it will be no problem, but once you will do an import, or change things in the database manually or in other ways than the usual, you might introduce problems. So, in your get_last_numero function, you might want to sort on that (meta) query value DESC. ACF has a function for meta queries to sort numerically.
Second, get_last_numero() + 1 might seem to work, but you’re adding a string and a number, which is not a good thing to do. PHP will figure it out in most cases, but since ACF will return a string for a field and you know that, you could cast your return value to integer by preceding the value with (int), so return (int)$numero
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Custom media upload content for inserting custom post shortcode
- Redesigning Custom Post Type “Add New” page
- How to Remove Certain Screen Options and Meta Boxes from add/edit post type?
- Creating a default Custom Post Template that a Theme can override
- How to load a new template page according to a particular URL?
- How to get the custom page get_permalink?
- Updating post meta for custom post types
- remove custom taxonomy metabox form custom post type
- Custom Post Type Statuses
- How to Build a Movie Library in WordPress 3.x
- Get image URL from media library in input
- Way to hook into a sidebar call to replace it with a custom sidebar
- WP_Query ordering numbers as letters
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Is it possible to create Custom Post plug-in?
- Using a post-signup hook to get user details
- Matching Chapters to a Custom posts [closed]
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Making a Template for a CPT created by a plugin
- Unable to delete custom post types, confusion around capabilities
- Adding CSS to custom post type admin page causes error
- ACF: post query, hide duplicate values [closed]
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- How to Resize the Custom Post Images?
- Amazon.com intergration with WordPress?
- Adding custom meta boxes to specified custom post type
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Preview with Custom Post Type Not Working
- Plugin generated unexpected output – No PHP errors
- Custom Post Type template for homepage
- Custom Post Type, Custom Columns List
- How to create repeater field manually, without plugin (ACF Pro)?
- Need to edit author permissions | custom taxonomy
- Is it possible to pin a post in second position from top
- How to get the custom field value using SQL query
- Setting Author on CPT
- Check if theme supports sidebar
- How to display the category name in the tab and post inside the tab in WordPress?
- custom post type plugin error [closed]
- How to display the custom post related blog by category?
- Problem with checked box on wp car manager plugin
- Ultimate Members Default Post Layout problem
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- $wpdb->insert not working inside save_post tag
- Cannot view Custom Post Type no matter what I try
- Add Custom Field to Post Pages via Plugin
- plugin_dir_url(__FILE__) searches parent theme in ACF extension
- How to add jquery to my custom post type wp plugin
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- get_option include in my adsense
- Making a Custom Post Type Publish Loop
- Is an Office a custom post type [closed]
- Wrong block appender button showing
- How to access the page without registering in wordpress
- CPT template is not being automatically used single post pages
- How to make content as required in custom post type?
- public custom posts not showing in my wordpress plugin
- How to provide page_template path in custom plugin using WordPress
- Plugin question, How to insert a colon in a value box
- Remove H1 title in admin post edit screen
- PHP Fatal error: Cannot redeclare distance() when making a new block
- How to Display News in a Timeline with Headline, Category, and Time?
- How to call a plugin function from index.php
- How can I make my custom shortcode work in a Custom HTML Widget?
- How Does WordPress Uninclude/Deactivate A Plugin?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Remove POST_TYPE from custom post type permalink
- How can I add a custom meta value on file upload?
- Add a Custom Permalink option in the Permalink Admin Screen?
- publish_post plugin hook doesn’t always pass $post->post_content
- Let user subscribe to specific categories
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- Programatically download a plugin
- Do action only on certain front end pages?
- Advanced Custom Fields plugin – get text from editor field and save it in a variable
- Archive – same title for the first two posts
- Creating plugin using simple_html_dom parser?
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- Can a Plugin Override New User Default Role Type
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- Bulk update wordpress posts
- Is there a plugin for automatically adding a word or symbol after a trigger word? I.e. Like a search and replace but more like search and add? [closed]
- Use jQuery Datepicker code from plugin
- Plugin option default value
- How can i listing current category and Featured Category post list?
- Posts 2 Posts: Display custom types connected to the same other custom type but with another connection
- acf backend error handling
- specific rows style for in custom list table using WP_List_Table
- Custom plugin settings page with tab. Error: “Sorry, you are not allowed to access this page.”
- return bbp_get_topic_author_id as integer
- How to add a box note in wordpress plugin page ? top header side.
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Change default url to plugin custom post type
- How can I pass value to function in add_menu_page?
- How to hide a piece of code from a wordpress web page?
- Make a magic tag work with Custom Post Types
- Someone Comment 1000 times in a Day in My WordPress Site, What Can i Do