I need to interact my website with an API in the XML format to receive the feeds and store them in custom fields inside WordPress ..
I tried to write the code myself but I'm not the best with PHP so ...
I have a plugin that automatically converts Contact Forms to Post. I made sure that all the posts submitted by this plugin contain a particular taxonomy.
Category: "Discussion nuggets".
I would want to allow commenting for all posts with that category. ...
I'm using wp_set_object_terms($postId, Array('tag1','tag2','tag3'), 'customtaxonomy');
with wp_insert_post to automatically create a new post.
it will show as
But on wordpress editor it is separated not like combined together as the image above, what I do to ...
How can I make work these functions not just when the user profile is updated. Also when a frontend form is submited?
Here the functions:
function get_channel_by_author( $user_id ) : int {
// if we don't find anything then a value of 0 ...
I am trying to create a custom post type input using the wp_insert_post function, this custom post type called game was created using the pods framework and contains a series of custom fields which I try to give values using ...
I am creating posts (variable products) using (wp_insert_post) function. An Example, I have 9 colors, 9 sizes. Which makes 9×9 = 81 total variations for 1 product, which is 81 times below function to be executed.
function create_product_variation( $product_id, $variation_data){
...
I want to insert as a custom post type some data fethced from an API, I store that data and then pass it trough a for loop, then I use the loop data to create an array to pass it ...
I need to insert a post via wp_insert_post and then add relevant post_meta - however, the WP admin has been customized with the excellent ACF.
I know I can add_post_meta in this way:
add_post_meta( $post_id, 'q_key_type', $q_key_type );
However, to ...
Anyone encountered this issue?
I have created a custom php script which adds a new post by using wp_insert_post() but everytime I run the code it creates a 2 new post where in it should be only be one, its ...
I'm using a form on my website to allow user to create posts on my wordpress admin. It works fine, but I have an issue, I don't get the tags meta inside my admin.
here is my php code :
<?php
if(isset($_POST['submit'])){
...