• Hi, so I’ve implemented the horizonal shortcode into my header so that it is showing a year, make, and model dropdown selector below my menu bar on every page. I’ve also changed the order from the default “make, model, year” to “year, make, model” by using your instructions from a previous thread.

    However, I am trying to make a separate “vehicle search” page where I want to place the shortcode [ymm_selector template=”selector.php” garage=1]. When I publish the page, it has a dropdown above the vertical selector with saved models. But, there is a big problem. Unlike the horizontal selector I inserted into the header, this one is not narrowing down to any vehicles when I make selections; it’s allowing me to select any year, any make, and any model. On top of that, it’s not even allowing me to initiate a search. Any idea what the problem is? Is it just conflicting with the horizontal search since that’s in the header already?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    Try to replace:

     
        $block->setWidgetId('content');
    

    with:

    
        $id = isset($atts['id']) ? (int) $atts['id'] : 0;
        $block->setWidgetId('content_' . $id);
    

    in the file:
    wp-content/plugins/ymm-search/ymm-search.php

    Then set id in the shortcode like this:
    [ymm_selector template=”selector.php” id=2]

    Stanislav

    Thread Starter wooq123

    (@wooq123)

    Hey Stanislav, this works like a charm. Thanks for the help. Will you at some point release an update with a simple checkbox option that allows for changing the order to year, make, model, as well as implementing this feature that you just provided the code for? Your plugin is very well designed and lightweight. Congrats on a very well designed plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue with Shortcode Selector not working on pages’ is closed to new replies.