When creating a new download in EDD and also adding a shortcode from EMG to the content of the post, this happens. When using the Classic Editor and the following plugin in version (old) 1.1.1 the download_id or post_id is suddenly the ID from the media gallery, instead of the post that is being edited.
https://www.ads-software.com/support/topic/bug-with-download_id/
I worked around it for my plugin, but resetting a post ID will cause problems for other plugins and postboxes as well. Could you take a look into this?
Regards,
Marcel
[site_reviews assigned_posts=post_id]
It shows that no reviews are there. Its right
It shows that one review is there, but it not true
post_id
of our media files during the import.
The media file was defined in the content.json
:
{
"type_title": "Media",
"post_id": 196,
"post_title": "title",
"post_status": "inherit",
"post_name": "image",
"post_content": "",
"post_excerpt": "",
"post_parent": 0,
"menu_order": 0,
"post_date": "2017-11-14 05:50:54",
"post_date_gmt": "2017-11-14 05:50:54",
"guid": "12345",
"post_mime_type": "image/jpeg"
...
}
The imported image should have post_id=196
.
In order to accomplish that, we assigned a new callback function to the hook advanced_import_replace_post_ids
:
private function define_hooks() {
$plugin_admin = Import_hooks();
$this->loader->add_action( 'advanced_import_replace_post_ids', $plugin_admin, 'replace_post_ids', 999 );
}
The callback function returned empty array, so all post_ids should be preserved in this case:
public function replace_post_ids( $replace_post_ids ) {
/*Post IDS*/
$post_ids = array();
return $post_ids;
}
However, the imported image has different post_id from the initial value.
How can we preserve post_id of the media files during the import?
]]>Beaver Builder’s link to open the editor looks like this:
domain.com/page-slug/?fl_builder.
I try to accomplish this by the following bit:
$beaverbuilder_editor_link = site_url( $slug . '?fl_builder');
But then the slug isn’t part of the link. So it looks like:
domain.com/?fl_builder
Anyone any idea how to get this to work? Cheers!
]]>Give_Shortcode_Generator->generate_post
and it’s looking for field form_id
into the table give_formmeta
. It throws an error Unknown column 'cdxn_post_meta.post_id' in 'on clause'
The full query is this:
SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_give_formmeta ON ( wp_posts.ID = wp_give_formmeta.form_id ) INNER JOIN wp_give_formmeta as cdxn_post_meta on cdxn_post_meta.post_id = wp_posts.ID WHERE 1=1 AND (
( wp_give_formmeta.meta_key = '_give_goal_option' AND wp_give_formmeta.meta_value = 'enabled' )
) AND wp_posts.post_type = 'give_forms' AND ((wp_posts.post_status = 'publish')) OR cdxn_post_meta.meta_key='_wp_attachment_image_alt' AND cdxn_post_meta.meta_value LIKE '%zip%' GROUP BY wp_posts.ID ORDER BY wp_posts.post_title ASC LIMIT 0, 30
and it’s being created when I search a word in media library (“zip” is the word being used in this case)
I believe that plugin causing the problem is this: https://es.www.ads-software.com/plugins/media-library-helper/
]]>add_filter('acf/validate_value/name=numero', 'unique_numero_field', 10, 4);
function unique_numero_field($valid, $value, $field, $input) {
return $_POST['post_id'];
}
How to get the post_id here?
When setting the dynamic values for title as post_id – the post id is showing in the form title.
Facebook pixel is sending wrong information when it comes to translated products.
Basically Facebook pixel is sending different content_ids instead of SKUs – depending on the language used on the page they appear on: for instance, same products content_ids will be [“XXX_215”] on an english written page (XXX being the SKU and 215 being the WP post id), and [“XXX_721”] on a french written page.
Is there a way to identify products with SKUs instead of IDs?
Thank you,
Lee
]]>get_the_ID()
, global $post; error_log(print_r($post->ID,true))
, the_ID()
and I cannot the post_ID of a page on load in WP. I have added:
add_action( 'load-post.php', 'myFunc' );
add_action( 'post.php', 'myFunc' );
add_action( 'load-post-new.php', 'myFunc' );
function myFunc(){...}
How can I do this?
]]>