Danny
Forum Replies Created
-
Forum: Plugins
In reply to: [A-Z Listing] 4.0.1 crashed WP login page & another issueHey @diddledani Thank you for responding.
I’ve taken the measure to replace all WP core files and re-installed the latest version; 4.1.2
Everything seems to be well now – no more critical errors when loading the login page.
Forum: Plugins
In reply to: [WP Store Locator] Show ACF value inside Info Window templateHoly smokes~! I just discovered that the type = ‘wp_editor’ can be declared. This means, I may not need ACF after all. Yeay!
There are some issues though..
- I can enter text into the Text tab and not the Visual tab – is this a bug?
- I need to remove the Add Media function from the editor here – any ideas?
Here’s the updated full code:
function custom_meta_box_fields( $meta_fields ) { $meta_fields[__( 'Additional Information', 'wpsl' )] = array( 'phone' => array( 'label' => __( 'Tel', 'wpsl' ) ), 'fax' => array( 'label' => __( 'Fax', 'wpsl' ) ), 'email' => array( 'label' => __( 'Email', 'wpsl' ) ), 'url' => array( 'label' => __( 'Url', 'wpsl' ) ), 'my_editor' => array( 'label' => __( 'Description', 'wpsl' ) ) ); return $meta_fields; } add_filter( 'wpsl_meta_box_fields', 'custom_meta_box_fields' ); function custom_frontend_meta_fields( $store_fields ) { $store_fields['wpsl_my_editor'] = array( 'name' => 'my_editor', 'type' => 'wp_editor' ); return $store_fields; } add_filter( 'wpsl_frontend_meta_fields', 'custom_frontend_meta_fields' ); function custom_listing_template() { global $wpsl_settings; $listing_template = '<li data-store-id="<%= id %>">' . "\r\n"; $listing_template .= "\t\t" . '<div>' . "\r\n"; $listing_template .= "\t\t\t" . '<p><%= thumb %>' . "\r\n"; $listing_template .= "\t\t\t\t" . wpsl_store_header_template( 'listing' ) . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address %></span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% if ( address2 ) { %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address2 %></span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-country"><%= country %></span>' . "\r\n"; $listing_template .= "\t\t\t" . '</p>' . "\r\n"; // Check if the 'my_editor' contains data before including it. $listing_template .= "\t\t\t" . '<% if ( my_editor ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '<%= my_editor %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t" . '</div>' . "\r\n"; // Check if we need to show the distance. if ( !$wpsl_settings['hide_distance'] ) { $listing_template .= "\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '' . "\r\n"; } $listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n"; $listing_template .= "\t" . '</li>' . "\r\n"; return $listing_template; } add_filter( 'wpsl_listing_template', 'custom_listing_template' ); function custom_info_window_template() { global $wpsl_settings, $wpsl; $info_window_template = '<div data-store-id="<%= id %>" class="wpsl-info-window">' . "\r\n"; $info_window_template .= "\t\t" . '<p>' . "\r\n"; $info_window_template .= "\t\t\t" . wpsl_store_header_template() . "\r\n"; $info_window_template .= "\t\t\t" . '<span><%= address %></span>' . "\r\n"; $info_window_template .= "\t\t\t" . '<% if ( address2 ) { %>' . "\r\n"; $info_window_template .= "\t\t\t" . '<span><%= address2 %></span>' . "\r\n"; $info_window_template .= "\t\t\t" . '<% } %>' . "\r\n"; $info_window_template .= "\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n"; $info_window_template .= "\t\t" . '</p>' . "\r\n"; $info_window_template .= "\t\t" . '<% if ( phone ) { %>' . "\r\n"; $info_window_template .= "\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . '</strong>: <%= formatPhoneNumber( phone ) %></span>' . "\r\n"; $info_window_template .= "\t\t" . '<% } %>' . "\r\n"; $info_window_template .= "\t\t" . '<% if ( fax ) { %>' . "\r\n"; $info_window_template .= "\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'fax_label', __( 'Fax', 'wpsl' ) ) ) . '</strong>: <%= fax %></span>' . "\r\n"; $info_window_template .= "\t\t" . '<% } %>' . "\r\n"; $info_window_template .= "\t\t" . '<% if ( email ) { %>' . "\r\n"; $info_window_template .= "\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'email_label', __( 'Email', 'wpsl' ) ) ) . '</strong>: <%= formatEmail( email ) %></span>' . "\r\n"; $info_window_template .= "\t\t" . '<% } %>' . "\r\n"; /** * Include the data from a custom field called 'my_textinput'. * * Before you can access the 'my_textinput' data in the template, * you first need to make sure the data is included in the JSON output. * * You can make the data accessible through the wpsl_frontend_meta_fields filter. */ $info_window_template .= "\t\t" . '<% if ( my_editor ) { %>' . "\r\n"; $info_window_template .= "\t\t" . '<%= my_editor %>' . "\r\n"; $info_window_template .= "\t\t" . '<% } %>' . "\r\n"; $info_window_template .= "\t\t" . '<%= createInfoWindowActions( id ) %>' . "\r\n"; $info_window_template .= "\t" . '</div>' . "\r\n"; return $info_window_template; } add_filter( 'wpsl_info_window_template', 'custom_info_window_template' );Forum: Plugins
In reply to: [WP Store Locator] Show ACF value inside Info Window templateHi there @farroyob Thank you for trying to help me with this.
I did read through the specified documentation. And noted the following comment in the code..
Before you can access the ‘my_textinput’ data in the template, you first need to make sure the data is included in the JSON output.
That was why I started thinking whether I had to do something with the wpsl_cpt_info_window_meta_fields filter in order to get my ACF value to display in the info_window_template
Here’s my full code to show the ACF data in the listing template (this works) and the info window template (need help here)
// Add storeDescription meta data to listing template function custom_store_meta ( $store_meta, $store_id ) { $storeDescription = get_field( 'store_description', $store_id ); $store_meta['storeDescription_data'] = $storeDescription; return $store_meta; } add_filter( 'wpsl_store_meta', 'custom_store_meta', 10, 2 ); // Modify listing template (left sidebar) function custom_listing_template() { global $wpsl_settings; $listing_template = '<li data-store-id="<%= id %>">' . "\r\n"; $listing_template .= "\t\t" . '<div>' . "\r\n"; $listing_template .= "\t\t\t" . '<p><%= thumb %>' . "\r\n"; $listing_template .= "\t\t\t\t" . wpsl_store_header_template( 'listing' ) . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address %></span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% if ( address2 ) { %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address2 %></span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<span class="wpsl-country"><%= country %></span>' . "\r\n"; $listing_template .= "\t\t\t" . '</p>' . "\r\n"; // Check if the 'storeDescription_data' contains data before including it. $listing_template .= "\t\t\t" . '<% if ( storeDescription_data ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '<%= storeDescription_data %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t" . '</div>' . "\r\n"; // Check if we need to show the distance. if ( !$wpsl_settings['hide_distance'] ) { $listing_template .= "\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '' . "\r\n"; } $listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n"; $listing_template .= "\t" . '</li>' . "\r\n"; return $listing_template; } add_filter( 'wpsl_listing_template', 'custom_listing_template' ); // Store custom data in WPSL JSON response function custom_frontend_meta_fields( $store_fields ) { $store_fields['wpsl_store_description'] = array( 'name' => 'store_description', 'type' => 'textarea' ); return $store_fields; } add_filter( 'wpsl_frontend_meta_fields', 'custom_frontend_meta_fields' ); // Add storeDescription_data field to info window function custom_cpt_info_window_meta_fields( $meta_fields, $store_id ) { $storeDescription = get_field( 'store_description', $store_id ); $meta_fields['store_description'] = get_post_meta( $store_id, 'wpsl_store_description', true ); // $meta_fields['my_textinput'] = get_post_meta( $store_id, 'wpsl_my_textinput', true ); return $meta_fields; } add_filter( 'wpsl_cpt_info_window_meta_fields', 'custom_cpt_info_window_meta_fields', 10, 2 ); // Modify info window template (popup) function custom_cpt_info_window_template() { $cpt_info_window_template = '<div class="wpsl-info-window">' . "\r\n"; $cpt_info_window_template .= "\t\t" . '<p class="wpsl-no-margin">' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<strong><%= store %></strong>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<span><%= address %></span>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<% if ( address2 ) { %>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<span><%= address2 %></span>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<% } %>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n"; $cpt_info_window_template .= "\t\t\t" . '<span class="wpsl-country"><%= country %></span>' . "\r\n"; $cpt_info_window_template .= "\t\t" . '</p>' . "\r\n"; // Check if the 'storeDescription_data' contains data before including it. $listing_template .= "\t\t" . '<% if ( storeDescription_data ) { %>' . "\r\n"; $listing_template .= "\t\t" . '<%= storeDescription_data %>' . "\r\n"; $listing_template .= "\t\t" . '<% } %>' . "\r\n"; $cpt_info_window_template .= "\t" . '</div>' . "\r\n"; return $cpt_info_window_template; } add_filter( 'wpsl_cpt_info_window_template', 'custom_cpt_info_window_template' );I’m not sure if I could’ve skipped the wpsl_cpt_info_window_meta_fields filter and use ACF’s get_field directly inside the wpsl_cpt_info_window_template part.
Thanks in advance again.
Forum: Plugins
In reply to: [WP Store Locator] WhatsApp number with link to launch WhatsAppHey @farroyob thanks for the response. And I’m glad to hear that I’m on the right track. Also, thank you for the bringing up the conditional clause.
I’ll give this all a whirl and come back here if I run into a wall later. (^_^)
Seems like it resolved itself somehow 🤷♂️
Hey Gerard, thank you for the response. I thought so, and will bring this back to WooCommerce’s team again.
Forum: Plugins
In reply to: [WooCommerce] Clarification of post thumbnail declarationsHi there, I had checked with Shortpixel and they said it’s not from their plugin.
Having checked with another friend who does WordPress development, I think it’s more accurate as below:
These were the original thumbnail names. They have now been renamed to woocommerce_ , but these are maintained for backward compatibility
This brought me back here to ask..
Would you know whether WooCommerce still generates post thumbnails for the shop_ post thumbnails?
I want to address my concerns for any redundant post thumbnails generated 🙂
- This reply was modified 4 years, 11 months ago by Danny. Reason: Added link to Shortpixel response
Forum: Plugins
In reply to: [WooCommerce] Clarification of post thumbnail declarationsHey Gabriel, thank you for the response and explanation.
I’ll hit up the Shortpixel team and find out how those thumbnails are used.
Hey @mlamacchia , I asked this on behalf of a client and we’ve got a ticket with the Hubspot team now. In the ticket, I had shared a screen recording reproducing the issue from our end.
For the moment, we decided to deactivate the HS plugin and manually add the tracking code via GTM.
As the larger issue we’re facing is that traffic is no longer showing up on their GA when using the HS plugin 🤷♂️
I’ll close this thread now, since we’re already in communication with your team.
Forum: Plugins
In reply to: [Ultimate Responsive Image Slider] Conflict with Cloudflare rocket loaderHey Faraz, thank you for responding.
Here’s the live page URL; http://wanderluxe.theluxenomad.com/future-of-weddings-post-covid-19/ (there’s 1 slider on this page)
And unless your new plugin has an importer to migrate the current sliders, I don’t think it can be considered at the moment. There are more than 50 sliders in this website.
Hey @romanaxeweb , this was what Elementor’s team informed me:
..’Archive URL’ dynamic feature only works within the Archive Templates and not in Single posts as stated in the article – Dynamic Tags (Pro)
Yes, it was crappy to read that. Thankfully, I managed to get around it.
It’s a stop gap solution only. And I do not recommend it as an answer.
What I did was added an ACF selector to get the Genre, then used the ACF URL in Dynamic Tag to generate the Genre link.
Forum: Plugins
In reply to: [Delete Duplicate Posts] Not working on localHey Lars,
1. Yup, same titles.
2. Yup, all published.
I couldn’t wait for an answer. So I deleted all the posts and imported the needed posts again – this was a surefire way to ensure no duplicates.
I’ll give the plugin another go in future.
Forum: Plugins
In reply to: [Custom Post Type UI] CPT content showing for 1st post onlyHey Michael,
Elementor’s team replied with the following:
Further investigating I found out this is a general bug we’re experiencing right now and our developers are already working to fix it.
It basically relates to the Dynamic option “Post Image Attachments” which won’t load any images uploaded into the post editor from the media library.
Although I’m unable to give you an exact ETA for feedback from our development team, they will work to troubleshoot and address this as quickly as possible.
Looks like I’ll have to figure out another method to achieve what I need.
Thank you for the follow-up.
Forum: Plugins
In reply to: [WooCommerce] Send Analytics reports to a different emailThank you for the response, Stuart. Hopefully the team will think about it.
Organizations with more people would like more than 1 person to download reports. And it becomes more inconvenient if the site admin goes on leave.
Forum: Plugins
In reply to: [Weblizar Pin It Button On Image Hover And Post] Change color of pin?I’ve the same question too