Classifieds - "override this file in your active theme"?

I've been trying to get the Classifieds plugin to look like my theme, but I'm not exactly sure how to. When I go into the Plugins settings, there are no theme-related options, so I presumed it inherited the look of the active theme and placed the content in the appropriately designated area where everything else goes.

Having looked through the plugin's directory, I see that the plugin is using files under the /plugins/classifieds/ui-front/general directory which contains various PHP files controlling the look of it. When I open them up and look at the top of the file, I'm greeted with...

* The template for displaying the Checkout page.
* You can override this file in your active theme.

My problem is - how do I override that file in my active theme? I thought I could edit them in the same directory, but I know when the plugin gets updated then the files and changes I would make will be overwritten. I've tried duplicating the files into my themes folder with no luck.

So I'd say I'm clearly missing something here and if anyone could help me figure it out, I'd really appreciate it. Thanks!

  • Arnold
    • El Macho WP

    What you do is copy the file in the general directory up to your theme directory and then edit the file in themes. The program looks through the available files and use the one in the theme by preference and fall back to the other files if it doesn't find them there.

    Of course when you update your theme you may wipe the files as well so do a good backup.

    If you look in Settings there is an option to copy the single file up to your theme and give it the proper name.

  • aecnu
    • WP Unicorn

    Greetings statvoid,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU Dev member!

    Cheers, Joe

  • Andrew
    • WPMU DEV Initiate

    Hi,

    This person didn't respond to this ticket, but I am trying to accomplish the same thing. I copy the file /wp-content/plugins/classifieds/ui-front/general/page-my-classifieds.php
    to /wp-content/themes/pagelines-template-theme (the theme directory). Without making any changes to it, if I load that page on the frontend, there is a plain white page with no error message. If I delete the file from the theme directory, the page immediately works again. Am I copying it to the wrong place? Please let me know of any ideas...thanks.

  • Arnold
    • El Macho WP

    That page is not a complete template. The way we get the page to use your themes styling is to use the current themes page.php (or whatever it uses for a Page) and replace the content of that template with the output from page-my-classifieds.php. So there is no header, footer , sidebars etc. That comes from your theme.

    If you taking over the whole thing you'll need to write your own routines. You can use ours as a started but you'll have to wrap it with header sidebars etc from your theme.

  • aecnu
    • WP Unicorn

    Greetings regalcreative,

    Welcome to WPMU DEV!

    Please be so kind as to not hijack tickets and open closed tickets, just simply open your own and I offer this suggestion so we may all work together more efficiently and according to common forum protocol and we do want to help if at all possible.

    Have a GREAT holiday season and thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • sas313
    • WPMU DEV Initiate

    Hello-

    i am having this very same issue while trying to do this with DIRECTORY plugin. i move "page-my-listings.php" to my theme folder and all i get is a black white page on the front end.

    is it supposed to be as easy as just coping that file over? do i need to add any code to that file - like header/footer calls?

    sorry to open such an old thread but this one was the closet to the issue i am having that i could find.

    if need be i could post here instead: https://premium.wpmudev.org/forums/topic/how-do-i-override-the-templates-for-the-classifieds-plugin-in-my-template

    thanks-

  • sas313
    • WPMU DEV Initiate

    ok - i understand completely and that makes sense - is there anything else i need to be aware of as i have tried that and ran into the following error (after correcting a JS path issue for ui-front.js)...

    Fatal error: Using $this when not in object context in /page-my-listings.php on line 52

    line 52: if ( $this->is_full_access() ):

    at the top of this page it has

    * The template for displaying the Add/edit listing page.
    * You can override this file in your active theme.

    is this not the case as it seems like its not as easy as indicated to override it.

    thanks for the quick response.

  • sas313
    • WPMU DEV Initiate

    bingo! that did the trick.

    (after adding in header/sidebar/footer) i did a search and replace off all $this instances to $Directory_Core and everything is up and running as expected - and editable from my theme now.

    thank you very much for the quick help and walking me through the solution.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.