Error when clicking on classifieds category

I keep getting this when I click on a category:
Classifieds / classifieds_categories / animals

Fatal error: Using $this when not in object context in /home/sitedevl/public_html/gvec/wp-content/plugins/classifieds/ui-front/general/taxonomy.php on line 46

site is gvec.sitedevlink.com

  • Vaughan
    • Support/SLS MockingJay

    Hi Brian,

    Hope you're well?

    Are you using any custom templates for this in your theme? This usually happens if you copy your templates to the wrong path.

    For classifieds, if you use any custom templates you should add them to a classifieds folder in your theme.

    So

    /wp-content/themes/your-theme/classifieds/taxonomy.php

    instead of /wp-content/themes/your-theme/taxonomy.php

    If that's not the case, Could you grant support access from the dashboard plugin so we can take a closer look? See https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Thanks

  • Vaughan
    • Support/SLS MockingJay

    Hi Brian,

    Can you try the following.

    Open up & edit the following file.

    /wp-content/plugins/classifieds/ui-front/general/taxonomy.php

    Find the following on line 20:

    <?php global $bp; if ( isset( $bp ) ): ?>

    Replace with:

    <?php global $bp, $Classifieds_Core; if ( isset( $bp ) ): ?>

    Find the following on line 46

    load_template( $this->custom_classifieds_template( 'loop-taxonomy' ) );?>

    Replace with:

    load_template( $Classifieds_Core->custom_classifieds_template( 'loop-taxonomy' ) );?>

    Hopefully that should fix this.

  • Brian
    • Design Lord, Child of Thor

    Thanks that worked well, however now there is a listing above the classified, for example if the classified is animal, this appears above it:
    Classifieds / classifieds_categories / animals

    Also, blank categories have a phantom listing?

    Thanks again!

  • Vaughan
    • Support/SLS MockingJay

    Hi Brian,

    It looks like your theme is listing the category paths as the page title.

    You should be able to hide the path on the category page using the following CSS

    .archive.tax-classifieds_categories h1.page-title {
      display: none;
    }

    With regards to the phantom listing, this is definitely something related to the theme. You may need to use a custom template for this.

    I don't know how you do this with headway theme. But usually you can copy the following from

    Copy /wp-content/plugins/classifieds/ui-front/general/loop-taxonomy.php

    to

    /wp-content/themes/your-current-theme/classifieds/loop-taxonomy.php

    Hopefully that should fix it.

    Hope this helps

  • Vinod Dalvi
    • WP Unicorn

    Hi Brian,

    Thanks that worked well, however now there is a listing above the classified, for example if the classified is animal, this appears above it:
    Classifieds / classifieds_categories / animals

    Is this issue resolved for you now by using the solution posted by Vaughan in his previous reply?

    Also, blank categories have a phantom listing?

    Could you please share the page URL from your site where it's displaying so that i can test it?

    Also would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.