Categories
CMS Mastering Development Wordpress

ACF pre_save_posts submitting on page load

I have a form using all ACF fields. I want to submit the form to a custom post type and set the title. However when I just load the page, the form is submitting. I’m using the same example off of the ACF website. Here’s my code: function instructor_time_title( $post_id ) { if( $post_id != […]

Categories
CMS Mastering Development Wordpress

Create a new query in function.php to filter blog posts

My goal is to filter blog posts (those which are requested in the blog page – Reading settings) depending on an expiration date, and then to change their category depending on a choosen future category (no more blog post, but medias post for example). I manage to do this, but only if I include the […]

Categories
CMS Development Wordpress

Auto custom field to category

i use see this script to auto fields to category function wpse_248054(){ $custom_field_name = ‘Genre’; $posts = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_type’=> ‘post’, ) ); foreach($posts->posts as $post){ $meta = get_post_meta($post->ID, ‘Genre’, true); if(! empty( $meta )){ $term_id = wp_create_category($meta, 3); // 2nd argument, parent id (optional) $new_post_cat = wp_set_post_terms( $post->ID, $term_id, ‘category’, […]

Categories
CMS Development Wordpress

Send reminder email after x days of publish post / custom post type

Is there any plugin to send email after (one year) of publish post/custom post. Or I have to run cron to do that kind of thing. I need to send email after X time of days after post has published. Email comes from inside that post. How to modify that code to get ALL posts […]

Categories
CMS Development Wordpress

Use ACF Relationship field to search against a subset of Posts

Using ACF I am able to present a list of Posts and allow the Editor to indicate related-content for a given Post. However, the editor has to search amongst all posts. Instead of having all possible posts, how do I limit this to a smaller group of posts? In this case I have a custom […]

Categories
CMS Development Wordpress

Modifying category order

I am working with a directory style wordpress theme that displays categories in masonry style columns with their posts listed under each category title. The categories are appearing on the front page in alphabetical order and I would like to change this preferably using advanced custom fields. I have managed to control the post order […]

Categories
CMS Development Wordpress

Arrey by tag from edit page

i have very specific question, I need a option to add array from the editor edit page, i mean when you type text to page i need option to select tag and display all post with this tag. This is some a code for array, but no idea how to add in to editorial page […]

Categories
CMS Development Wordpress

Arrey by tag from edit page

i have very specific question, I need a option to add array from the editor edit page, i mean when you type text to page i need option to select tag and display all post with this tag. This is some a code for array, but no idea how to add in to editorial page […]

Categories
CMS Development Wordpress

How to filter posts by specific date and its tag

I want to show the post dates of posts which is greater than $postdate value. what is the wrong with the following code? Instead of filtering the data by dates, it shows all the dates. I do not know what the problem is with the logic. Any help will be most appreciated. <?php $postdate = […]

Categories
CMS Development Wordpress

how to display the dates of some posts based on some condition in meta query?

i want to show the post dates of posts which is greater than $postdate value what is the wrong with the code?? it shows no results! any help will be most appreciated. $postdate = get_the_date(‘F j, Y’); $postsUpdates = new WP_Query(array( ‘posts_per_page’ => -1, ‘post_type’ => ‘post’, ‘meta_key’ => ‘post_date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => […]