Firstly I don’t see $args assigned anywhere.
Secondly before displaying in front-end, check if post is created with your values.
Little debugging like printing $new_post before insert might give you your issue.
Related Posts:
- How to export comments in WordPress?
- How can I call a function from one plugin within another plugin?
- Gutenberg disallow certain custom blocks but keep all core blocks?
- Publish author posts only with editor approval?
- Replacing Icons in the Dashboard
- Customizing subject in comment notification e-mails
- WP showing “warning: call_user_func_array()”, What to do?
- Declare a function before plugin does on the theme functions.php file
- Generate Advanced Custom Fields box in custom admin menu page
- Removing user contact methods works from functions.php but not from a plugin
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- Use functionality of 2 wordpress plugins
- Fatal error: Class not found in
- How can i change an image’s author?
- Converting a simple plugin to be placed inside of functions.php
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Showing Co-Authors on post page
- jQuery Plugin to use WordPress functions in AJAX request
- greatest() function returns undefined property
- Debugging Technique Question re: functions.php
- WP Job Manager Category Drop-down; Change Placeholder Text Via Filter
- Custom Taxonomy Tag Search
- Redeclare theme’s function in a plugin
- I have functions in my wordpress plugin. How do I get them to work for me?
- Shortcode button dosent work for all posts. Work for first post only
- Change wordpress current_time function to different timezone
- How to override a plugin function wrapped in a class?
- Edit Yoast SEO breadcrumbs output [closed]
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Using a post-signup hook to get user details
- Restrict media upload size by format
- Show function to super admin
- Facebook Messager Plugin
- Grab WordPress Salt Data From URL
- WordPress get_avatar function not correct working
- WordPress metaboxes – textfield suggestion automatically populated
- Which file of wordpress manage plugins functionalities?
- Improving the perfomance of a plugin action
- Check if variable is set in filter
- Image change on hover
- Passing stored variables to add_filter
- JQuery prepend a function
- Basics of changing plugin output
- Why can’t I call a (member) function from within a foreach?
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Send email with list of active plugins upon activation/deactivation
- Using custom fields for image alt and title
- Where Should i write the code for wordpress ajax voting?
- dynamic name of the style for wp_enqueue_style
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How do I convert my WordPress website to be domain agnostic?
- Add the_post_thumbnail_url to a shortcode in function.php
- Add action to custom Function
- Show media-uploads to all users
- Help with a function in a widget
- how can authors to define custom pages?
- Adding a Tag Parameter / Filter to My Shortcode
- Add_image_size not generating correct size
- How do I create pages within a WordPress post?
- How to make WooCommerce payment method field optional?
- How to upload large media file in chunks, without any plugin?
- WordPress Custom Hook with Class method
- WP Function does not trigger on Webhook API Call
- Why do I need to reload the page for WordPress to see the new custom field added with jQuery
- Cookie value changes back to previous value after changing
- RSS Feed on WordPress showing code (hypertext) in articles titles
- how to define a html folder to make it work with WordPress commands
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- Post source link plugin – small modification
- How to add specific script to WordPress webpage that will working with user input and databases
- Hide Plugin Custom Post Type Menu Link
- How to create algorithm for ordering posts in WordPress?
- ACF Fields are not showing up on Homepage
- Add external javascript to post template
- Block plugin update possibilities (but not by hiding notifications)
- Execute function activate/deactivate plugin in specific pages
- Plugin function in child theme
- Return function results within shortcode
- Soflyy WP All Import Custom File Download Issue
- Update (a function) post’s featured image as soon as $image_url changes
- How to Call Function From Separate WordPress Install on Same Server?
- How to echo a plugin’s function into a template?
- Why isn’t my plugin seeing other classes?
- Wp Ecommerce Reposition Product Page Product Thumbnail Image
- It possible to implement an adhoc php web application with wordpress?
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- How to Overwrite validate_plugin function
- Contact Form 7: custom validation [closed]
- functions.php conditional output for a single plugin
- Disable plugin function
- Single dash converted to double dash
- How use Dynamic hyperlink on each wordpress post?
- How to prevent page load on form submission
- Send email notification when meet the condition
- WordPress: code structure
- filter just a portion of plugin function
- Option value not getting updated until page refresh in WordPress
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)