Forum Replies Created

Viewing 15 replies - 16 through 30 (of 110 total)
  • Thread Starter WebDragon

    (@webdragon)

    argh nevermind – it wasn’t your optimizer – some bozo edited the page with the wrong wordpress editor and munged the code

    Further information

    https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/woo-product-carousel-slider-and-grid-ultimate

    I’ve been manually patching the appsero release with the current version that does not have the vulnerability, within the plugin, until such time as the updated version is bundled with it

    Thread Starter WebDragon

    (@webdragon)

    `“…wanted a central place to edit each pricing group, bullet points, and descriptions.”

    There are two setup/features that I can think will help you with this:

    WordPress Reusable Blocks
    Kadence Theme Pro and Kadence Blocks Pro add-ons`

    I think the best results were achieved with https://snipboard.io/7RcD8m.jpg a combination of ACF and CPT-UI to achieve a single-point ‘trade prices’ containing two separate Taxonomies under which the pricing group info can be subcategorized and thus indicating which pages they are to be displayed on. Re-usable blocks simply can’t cut it for this sort of thing.

    Regrettably the budget for the design does not include the Pro or addons, let alone annual renewals at the present time and that discussion is out of our hands.

    The code to get it all working is pretty simple. but currently it relies on my having snarfed out the wrapper + classes used by the theme accordion, into my shortcode:

    <?php 
    function _c1_pricing_accordion_shortcode( $atts = array() ) {                                                                                                                                                        if (! class_exists('ACF') ) {                                                                                                                                                                                        return <<<HTML                                                                                                                                                                                                                                                                                                                                                                                                                <div class="alert alert-warning">Unable to display content block 'pricing accordion': Advanced Custom Fields has been disabled. Please enable Advanced Custom Fields plugin for this functionality.</div>    HTML;                                                                                                                                                                                                                }                                                                                                                                                                                                                $_c1_buffer = '';                                                                                                                                                                                                extract( shortcode_atts( array(                                                                                                                                                                                      'taxonomy'  =>  '',                                                                                                                                                                                              'taxonomy_slug' =>  '',                                                                                                                                                                                          'wrapper_class' =>  'accordion-services',                                                                                                                                                                        'post_list'     => '',                                                                                                                                                                                       ), $atts ));                                                                                                                                                                                                                                                                                                                                                                                                                      if ( ! empty( $taxonomy ) ) {                                                                                                                                                                                        // do a taxonomy based query                                                                                                                                                                                     $q = new WP_Query( array(                                                                                                                                                                                            'post_type'     => 'trade_pricing',                                                                                                                                                                              'tax_query'     => array(                                                                                                                                                                                            array(                                                                                                                                                                                                               'taxonomy'  =>  $taxonomy,                                                                                                                                                                                       'field'     =>  'slug',                                                                                                                                                                                          'terms'     =>  $taxonomy_slug,                                                                                                                                                                              )                                                                                                                                                                                                            ),                                                                                                                                                                                                           ) );                                                                                                                                                                                                         } elseif ( ! empty( $post_list ) ) {                                                                                                                                                                                 // do a posts cross-sectional query by list of post ids                                                                                                                                                          // return the list in the same order as provided to the shortcode parameter                                                                                                                                      $my_posts = explode(' ', $post_list);                                                                                                                                                                            $q = new WP_Query( array(
        'posts_per_page'    => -1,
            'post_type'     => 'trade_pricing',
            'post_status'   => 'publish',
            'post_name__in' => $my_posts,
            'orderby'       => 'post_name__in',
    ) );
    } else {
        wp_reset_postdata();
        return;
    }
    $_c1_buffer .= <<<HTML
    
        <div class="wp-block-kadence-accordion alignnone {$wrapper_class}">
            <div class="kt-accordion-wrap kt-accordion-wrap   kt-active-pane-0 kt-accordion-block kt-pane-header-alignment-left kt-accodion-icon-style-basic kt-accodion-icon-side-right" style="max-width:none">
                <div class="kt-accordion-inner-wrap kt-accordion-initialized" data-allow-multiple-open="false" data-start-open="none">
    
    HTML;
    
    $random_id = random_int(100000, 999999);
    while ($q->have_posts() ) {
        $q->the_post();
        $_title = get_the_title();
        $_price_perhour = get_field('price_per_hour');
        $_price_range = get_field('price_range');
        $_description = get_field('price_description');
        $_bullets = get_field('pricing_item_list');
    
        $_c1_buffer .= <<<HTML
    
                    <div class="wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-1">
                        <div class="kt-accordion-header-wrap">
                            <button class="kt-blocks-accordion-header kt-acccordion-button-label-show" id="kt-accordion-header-{$random_id}"
                                aria-controls="kt-accordion-panel-{$random_id}" data-kt-accordion-header-id="0" aria-expanded="false">
                                <span class="kt-blocks-accordion-title-wrap"><span class="kt-blocks-accordion-title"><strong>{$_title}</strong> — {$_price_perhour} /HR {$_price_range}</span></span>
                                <span class="kt-blocks-accordion-icon-trigger"></span>
                            </button>
                        </div>
                        <div class="kt-accordion-panel kt-accordion-panel-hidden" id="kt-accordion-panel-{$random_id}" aria-labelledby="kt-accordion-header-{$random_id}" data-panel-height="auto" style="">
                            <div class="kt-accordion-panel-inner">
                                <span class="lead">{$_description}</span>
                                {$_bullets}
                            </div>
                        </div>
                    </div>
    HTML;
        $random_id++; // bump our randid so we have separate aria control numbers for each pane
    }
    
    $_c1_buffer .= <<<HTML
    
                </div>
            </div>
        </div>
    
    HTML;
    wp_reset_postdata();
    return $_c1_buffer;
    }
    
    add_shortcode('trade_pricing', '_c1_pricing_accordion_shortcode');
    
    Thread Starter WebDragon

    (@webdragon)

    oh goodness, I completely overlooked the ‘skip’ option as the impression I got was ‘skip adding this accordion’ not ‘skip preloading styles into the customizer’ – maybe it would be better worded as ‘use default accordion settings’ ??

    ok so at least there IS a way to get there. Good to know.

    Please consider altering ‘Skip’ as something a little more descriptive, cuz I completely missed that boat. maybe a big USE DEFAULTS button, heh. ??

    With regards to the other bit, I wound up pulling out the requisite accordion markup into a shortcode that I used to wrap the custom ACF + CPT-ui fields and post type data with, so I could achieve both “show me all trade pricing groups under this taxonomy” and “show me all trade pricing groups identified by their post-slug, in order of post-slug” with a shortcode.

    Nearly every page on the clients site has some sort of pricing accordion, but they re-use nearly every one on more than six pages each, and wanted a central place to edit each pricing group, bullet points, and descriptions.

    so, Hopefully your markup and classes for accordions don’t change too much as time progresses, unless there’s ways for me to pull the wrapping parts of your accordion template markup and classes (and add some of my own) programmatically?

    Thread Starter WebDragon

    (@webdragon)

    Worse, it looks like I’m going to have to be using ACF to set up a series of pricing units that each get pulled in separately on more than one page, and shoved into an accordion-style output on the front end, so I would -need- the default accordion stylesheet to exist, in the absence of one manually added to the gutenberg editor

    Thread Starter WebDragon

    (@webdragon)

    follow-up? anything? *surreptitiously leaves a Corning carafe of coffee on the countertop as a lure*

    Thread Starter WebDragon

    (@webdragon)

    ok I was able to resolve it in a fashion acceptable appearance-wise to the design spec, using max mega menu and the idea I had in my previous post, so that is all well and good.

    I still think Kadence would benefit from being able to optionally use a hamburger menu on Desktop as well, as that is definitely a design trend that will likely continue as it frees up space for the design on desktop, and retains familiarity thanks to mobile.

    Please consider adding this feature to Kadence, and this final post as an RFE.

    Thread Starter WebDragon

    (@webdragon)

    I might be entirely overthinking this, too, and am going to have to also experiment with making an actual ‘hamburger’ nav menu item and put the entire mega-menu structure below it, so the primary nav consists of one item, with submenu-as-mega-menu. still not sure of the best way to go about accomplishing the designer’s aims with wordpress

    Thread Starter WebDragon

    (@webdragon)

    kind of, similar, but not exactly. On the mobile side of things there is the off-canvas area here https://snipboard.io/rGpxt3.jpg
    I wish to duplicate this for the desktop side of things but NOT interfere with the mobile off-canvas choice, seeing as desktop doesn’t have this option built in https://snipboard.io/fINxLm.jpg

    and we’re looking to achieve something along the lines of https://snipboard.io/vlUoMm.jpg where on desktop, the hamburger opens a mega-menu (defined elsewhere) but on mobile hamburger opens the mobile-menu

    Thread Starter WebDragon

    (@webdragon)

    currently the server we are on is at Siteground and the managed php version for that server is PHP 7.4.30 = i.e. if I switch it, basically then becomes an unmanaged version until such time as I notice they’ve upped their managed version to one equivalent to my settings and switch it back manually to managed versioning again.

    I know the php support for 7.4.x ends in two months, and don’t know why siteground is holding off, but ˉ\_(ツ)_/ˉ

    Thread Starter WebDragon

    (@webdragon)

    so as it turns out, the WP Google Maps Pro (now WP Maps Pro) plugin had not had is license transferred to the new ownership and was not being updated and a new license corrected the issue we were seeing there, so you can safely ignore that as a potential point of cross compatibility issue

    Thread Starter WebDragon

    (@webdragon)

    not sure if related but I noticed a conflict between your plugin (6.0.0.1) and the wp google map pro plugin (v5.2.9) from here https://www.wpmapspro.com/ that I resolved by using their settings manager to prevent that plugin’s meta box from appearing during event add/editing .

    Thread Starter WebDragon

    (@webdragon)

    after re-saving the two errored events, and re-running the preview, it’s still hung a day later, with only the following in the debug log, if this helps any

    [09-Sep-2022 02:18:44 UTC] tribe-canonical-line channel=default level=debug source="TEC\Events\Custom_Tables\V1\Migration\Ajax TEC\Events\Custom_Tables\V1\Migration\Ajax::start_migration 475" dry_run=true
    [09-Sep-2022 02:18:44 UTC] tribe-canonical-line channel=default level=debug source="TEC\Events\Custom_Tables\V1\Migration\State TEC\Events\Custom_Tables\V1\Migration\State::save 347" phase="{\"complete_timestamp\":1662596245,\"phase\":\"preview-in-progress\",\"preview_unsupported\":false,\"started_timestamp\":1662689924,\"migration\":{\"estimated_time_in_seconds\":0.1562893390655517578125}}"

    I can try and revert back to 6.0.0.0 if you think it wise. I don’t know what the “last working version” would be in this case because I’ve never tried doing any migration preview before.

    Thread Starter WebDragon

    (@webdragon)

    we are already on 6.0.0.1

    oddly, and I don’t know why, but the job seems to have finished on its own somehow and now reports preview complete but there were some errors

    the debug log shows those errors as

    [08-Sep-2022 00:17:23 UTC] tribe-canonical-line channel=default level=error source="The 169199 is greater than the duration of the event" method="TEC\Events\Custom_Tables\V1\Models\Builder::upsert" line=307 model="TEC\Events\Custom_Tables\V1\Models\Event"
    [08-Sep-2022 00:17:23 UTC] tribe-canonical-line channel=default level=error source="The 169199 is greater than the duration of the event" method="TEC\Events\Custom_Tables\V1\Models\Builder::upsert" line=307 model="TEC\Events\Custom_Tables\V1\Models\Event"
    [08-Sep-2022 00:17:24 UTC] tribe-canonical-line channel=default level=error source="The 115200 is greater than the duration of the event" method="TEC\Events\Custom_Tables\V1\Models\Builder::upsert" line=307 model="TEC\Events\Custom_Tables\V1\Models\Event"
    [08-Sep-2022 00:17:24 UTC] tribe-canonical-line channel=default level=error source="The 115200 is greater than the duration of the event" method="TEC\Events\Custom_Tables\V1\Models\Builder::upsert" line=307 model="TEC\Events\Custom_Tables\V1\Models\Event"
Viewing 15 replies - 16 through 30 (of 110 total)