• I was previously using the [featured_properties] shortcode within one of my templates, and had a file called “property-overview-featured-overview.php” in my theme directory which worked correctly.

    Since the update, the shortcode is now using the property-overview template, so its not displaying how I would like (although it is showing the correct properties). Looking at the documentation, it would seem the [featured_properties] is now a legacy shortcode and [property-overview featured=true] should be used. Using this still doesn’t use the correct template.

    Do I need to rename my template file? Or how can I detect if featured=true has been passed so I can add some logic into the property-overview.php template file.

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    Try to rename the template to property-overview-featured-shortcode.php.

    Let me know if that helped.

    Regards.

    Thread Starter nmcmahon

    (@nmcmahon)

    Hi @mariakravchenko,

    Apologies – that was a typo in my original post. My file is already called “property-overview-featured-shortcode.php”, but the [featured_properties] shortcode is still using the “property-overview.php” file instead.

    Thanks,

    Niall

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Can you provide more information about which version did you update from and to. And also which theme do you use.

    Thanks

    Thread Starter nmcmahon

    (@nmcmahon)

    I am not sure what version I was on before. Have updated to version 2.3.8. I think it was version 2.2 before but can’t be sure.

    I am using a custom theme. The previous version allowed me to duplicate the shortcode files from the plugin into my theme so it would use them.

    If the “property-overview-featured-shortcode.php” file doesn’t work, is there any way of telling if featured=true has been passed to the [property-overview] shortcode? That way I could update the property-overview.php file to display the properties differently when its featured.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Yes, exact [property_overview featured=true] will display featured properties.

    Thread Starter nmcmahon

    (@nmcmahon)

    I am aware of that, but it is using the “property-overview.php” template file. Is there any way within that file I can check for the featured=true?

    That way I could update the template file to display the properties how I want to (how I currently have them in my “property-overview-featured-shortcode.php” file).

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    It seems no, but not sure I fully got your idea.

    Also, do not see the reason why that not working for you anymore.

    Can you detect what else was done except the wp-property update?

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Got one idea: Do you have Legacy Featured widgets enabled in Main tab?

    Thread Starter nmcmahon

    (@nmcmahon)

    It wasn’t ticked, but after ticking it, that sadly did not make any difference. It still uses the property-overview.php template, not the property-overview-featured-shortcode.php.

    Nothing was done other than the update.

    My idea would be that in the property-overview.php, if I can tell if the featured=true option was passed, I could add some logic and testing “if($featured == true) { … }” for example. Then I could display the output differently (in the same way I used to do in the “property-overview-featured-shortcode.php” template).

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Ok, understood your idea, but unfortunately, there is no way to do that.

    Did you put template to the root folder of the child theme?

    Thread Starter nmcmahon

    (@nmcmahon)

    Yes. Its directly in my theme. Same location as the property-overview.php file which is working. It just doesn’t seem to want to use the property-overview-featured-shortcode.php file.

    Where is the source code for the [featured_properties] shortcode? Perhaps I could try and follow the code and see why it isn’t using the right file…

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Here is some info, which I got from the developer
    https://screencast.com/t/qMSSdKL0FoN
    [featured_properties] shortcode is reffering to [property_overview] using parameters template and $args[ 'featured' ] = 'true';
    Property overview is using the following
    https://screencast.com/t/d9kiF3ZhNop

    Try to name the file property-overview-property-overview-featured-overview.php

    Regards.

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

The topic ‘Featured properties shortcode no longer working’ is closed to new replies.