Can you generate a featured image from two images from custom fields?
Can you generate a featured image from two images from custom fields?
Can you generate a featured image from two images from custom fields?
Actually the problem is that i was giving the select option a name of “parent_id”, which for some how automatically used as post parent, but once i changed it to other name it worked. Working code: <?php function hfx_register_meta_boxes() { add_meta_box( ‘select_hfx_workshop’, __( ‘Workshop for’, HFX_DOMAIN ), ‘hfx_select_workshop_parent_meta_box’, ‘forum’, ‘side’,’core’); } add_action( ‘add_meta_boxes_forum’, ‘hfx_register_meta_boxes’ ); … Read more
ok have a working fix, I used an if else statement combined with is_home to change <article id=”post-<?php the_ID(); ?>” <?php post_class(get_field(‘custom_field_X’)); ?> to <?php if ( is_home()) post_class(get_field(‘custom_field_X’)); else post_class(get_field(‘custom_field_Y’)); ?>> which has removed the custom_field_x settings from the permalink pages fo the posts. maybe there is a more elegant solution out there but … Read more
Custom meta POST request fired twice when updating a post in Gutenberg
Short of coming up with a MySQL query yourself, you could get a list of distinct meta_keys and build your query array based on the results. On another note, I think you may have misunderstood the meaning of EXISTS. It doesn’t denote finding the value parameter passed within the value of the given meta. I … Read more
Take a look at these lines to have an idea about adding the autosave feature: function hcf_save( $post_id ) { if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) { return; } if ( $parent_id = wp_is_post_revision( $post_id ) ) { $post_id = $parent_id; } $field_list = [ ‘hcf_author’, ‘hcf_published_date’, ‘hcf_price’, ]; foreach ( $field_list as … Read more
Metabox/Custom fields are not saving input data
use custom field value as featured image
how to execute custom field for structured data?
By default, no. When WP Core saves postmeta (i.e. custom fields) in the database, it associates it to the parent post – not the current revision, and the database does not store a timestamp for when postmeta was stored. If you want to keep track of future postmeta changes, you can add code to version … Read more