OC WordPress Web Designer
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Forms for ACF] Repeater Prefill and Save Max More Than 8Figured it out. Nevermind.
Forum: Plugins
In reply to: [Advanced Forms for ACF] Repeater Prefill and Save Max More Than 8It appears the issue is with the prefill from options hook. The repeater fills row correctly when the options prefill filter is removed, but obviously there’s no values. When added back in, the correct values appear but all repeater fields are missing exactly 2 row.
// Hook into the prefill filter to load values from 'options' when displaying the form.
add_filter( 'af/field/prefill_value', function ( $value, $field, $form, $args ) {
if ( $form['key'] === 'form_668c93c7ad670') {
return get_field( $field['key'], 'options' );
}
return $value;
}, 10, 4 );Forum: Plugins
In reply to: [Advanced Forms for ACF] Repeater Prefill and Save Max More Than 8Actually, its not the max number… every repeater field is just not filling the first two values. So weird.
Is there documentation on pre-filling a repeater field?
- This reply was modified 1 year, 1 month ago by OC WordPress Web Designer.
I don’t necessarily need 10 emails every 5 minutes, but some sort drip sending or any scheduling options. Its currently send now, send all at specific time, or completely random. I wish it could have more control options to send over a time period.
- This reply was modified 1 year, 2 months ago by OC WordPress Web Designer.
Forum: Plugins
In reply to: [Kadence Blocks — Page Builder Toolkit for Gutenberg Editor] Fatal ErrorFound it. Removed the below and it fixed the issues.
/* Disable Image Side scaling on upload
========================================================= */
add_filter(‘big_image_size_threshold’, 3840);Forum: Plugins
In reply to: [Kadence Blocks — Page Builder Toolkit for Gutenberg Editor] Fatal ErrorI’ve debugged that on PHP version 8.2, the error occurs. Can you fix this?
- This reply was modified 2 years, 3 months ago by OC WordPress Web Designer.
I think I got it. If theres a better solution let me know.
function extract_url($string) {
$parts = explode(‘,’, $string);
return $parts[0]; // returns the first part, which is the URL
}[extract_url({featured_image})]
To clarify, I’m importing the field into a custom field because I don’t want to import the images. just the url. How do I do that in a normal field?
Figured it out.
Price is: [my_output_value({price[1]})]
function my_output_value( $value = null ) {
return ( empty( $value ) ) ? “0” : $value;
}Forum: Plugins
In reply to: [Yoast Duplicate Post] Clone page link on frontendDude, nice! I’ve been looking for this solution everywhere.
I changed it to redirect the the new post page that is created.
/** Performs some actions after copying the post. */ function my_custom_duplicate_post_post_copy($new_post_id) { $status = "publish"; // Update event based on status $post = array( 'ID' => $new_post_id, 'post_status' => $status, ); wp_update_post($post); // Perform some actions after copying the post. wp_safe_redirect(get_permalink($new_post_id), 301); exit(); } add_action('duplicate_post_post_copy', 'my_custom_duplicate_post_post_copy');I also have a shortcode button on the front end for cloning the current post
function duplicate_post_link_shortcode($atts) { $atts = shortcode_atts(array( 'text' => __('Clone this post', 'your-theme-text-domain') ), $atts); ob_start(); if (function_exists('duplicate_post_clone_post_link')) { echo duplicate_post_clone_post_link($atts['text']); } return ob_get_clean(); } add_shortcode('duplicate_post_link', 'duplicate_post_link_shortcode');Yes that worked. Thank you.
What is the free version solution?
What is the free version solution then?
Update.
I Figured out how to add all categories. Code below. But how do you add a specific category. For example, I want to only show the categories in “color”?
Function.php
add_filter( 'dgwt/wcas/tnt/indexer/readable/product/data', function ( $data, $product_id, $product ) { $term = $product->getTerms( 'product_cat', 'string' ); if ( ! empty( $term ) ) { $html = '<span class="searchcategories">'; $html .= $term; $html .= '</span>'; $data['meta']['product_cat'] = $html; } return $data; }, 10, 3 );fibosearch.php added in child theme root (reindex after adding):
add_filter( 'dgwt/wcas/tnt/search_results/suggestion/product', function ( $data, $suggestion ) { if ( ! empty( $suggestion->meta['product_cat'] ) ) { $html = '<div class="searchcategories">'; $html .= $suggestion->meta['product_cat']; $html .= '</div>'; $data['content_after'] = $html; } return $data; }, 10, 2 );Forum: Plugins
In reply to: [Gravity PDF] Upload Thumbnail Image In PDFOh that makes sense, i didn’t specify that i’m using https://gravitywiz.com/documentation/gravity-forms-media-library/ so the thumbnails are being generated for every image since they are uploaded in the media library.
Is there a hook to call the image source to the thumbnail version to the pdf since it is being generated?