Cannot create posts via REST API
Sheepishly: The authorization field needs a space between “Basic” and the token. Problem solved.
Sheepishly: The authorization field needs a space between “Basic” and the token. Problem solved.
Unfortunately, there does not appear to be a way to change the default language away from EN-US, in the wordpress.org repository. An email responce just recieved from plugins[at]wordpress.org has confirmed that the default of EN-US is an intentional policy process. The submission is done in English US and then you will be able to translate … Read more
You’re halfway there. All you’re missing is the right hook: add_action( ‘pre_get_posts’, ‘num_posts_archive_project_ie’ ); The pre_get_posts hook fires after the main WP_Query object is instantiated but before it’s sent to the DB.
You could consider running actions.getPosts on mount via data-wp-init like: <div … data-wp-init=”actions.getPosts”> As per the documentation: This directive runs a callback only when the node is created. You could also consider server-rendering the initial set of posts, like: <div data-wp-watch=”callbacks.renderContent”> <?php $query = new WP_Query( array( … ) ); ?> <?php while( $query->have_posts() ) … Read more
As briefly discussed in the comments, WordPress is built to promote and provide several interfaces for it’s content such that it is possible to discover and access posts in a number of different ways. This includes (but is not necessarily limited to) things such as “Meta tags” embedded within every page’s markup to assist other … Read more
When registering your CPT, the rewrite and has_archive parameters will control the URLs (untested): register_post_type( ‘course’, array( … ‘rewrite’ => array( ‘with_front’ => false, ‘slug’ => ‘course’, ), ‘has_archive’ => ‘courses’, );
Relatively easy to achieve, just put this somewhere in your template within The Loop: <a href=”https://www.deparelevenementenservice.nl/<?php echo $post->post_name; ?>”>Link text</a>
I believe that it should be fine for themes to not have header.php or footer.php files. Block themes generally do not have these files. For example Twenty Twenty-Four, a theme built by the WordPress team. If a plugin errors because a theme does not have the aforementioned files, then I would chalk it to some … Read more
The meta_key parameter tells WP_Query to only return posts that have the price_sale_custom meta data. Remove that first, and then change orderby to reference the meta_query values: This is something that WordPress added support for in 4.2: https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/ https://stackoverflow.com/questions/17745334/how-to-order-by-multiple-meta-keys
Those messages are specified in the labels argument to register_post_type(), there’s a full list of them here.