hbrobjerg
Forum Replies Created
-
Forum: Reviews
In reply to: [All-in-One WP Migration and Backup] Scam@drwarlecki, thanks. But then it stops uploading every time around 10-11%
The issue was the theme “Dante by Swift Ideas.”
This theme adds many “Meta options” to the editor as seen here:
However, some of these metadata require to be set for certain functions to work. In this case, “sf_detail_type” must be set to “image” for the featured image to show in posts.
Hence, I added ‘meta’ => $metaData, where $metaData[‘sf_detail_type’] = ‘image’;
For this to work with REST API, I had to build a custom plugin to add this metadatum to be accepted:
<?php /* Plugin Name: Add meta tags to REST-API Description: Adds the specified meta tags to the REST-API for supporting posting via same. Version: 1.0 Author: None */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } function register_my_meta() { register_meta('post', 'sf_detail_type', array( 'show_in_rest' => true, 'single' => true, 'type' => 'string', 'auth_callback' => function() { return current_user_can('edit_posts'); } )); } add_action('init', 'register_my_meta');Posting now works and the issue has been resolved.
I’m about to have this resolved, just an hour of work more. It relates to either a plugin or the theme requiring additional metadata for displaying the featured image. I will share solution asap.