live-composer / live-composer-page-builder

Free page builder plugin for WordPress https://livecomposerplugin.com
GNU General Public License v3.0
171 stars 57 forks source link

Archive index templates not loading on custom taxonomies #319

Closed delorimier closed 7 years ago

delorimier commented 8 years ago

Checking added custom CPT in "archive index templates" has no effect. Template does not load, only archive.php from theme.

see screen capture

bandicootmarketing commented 8 years ago

SECONDING THIS - we are trying to do the same exact thing and running into the same issue here

delorimier commented 8 years ago

According to the LC team, this problem requires extensive debugging and will take awhile to solve. Hope they can eventually do it.

bandicootmarketing commented 8 years ago

@lumberman @delorimier @xdima92x please find our team's code attached.

  1. We edited filter.php to save our CPT called "ctc_sermon" archive
  2. We added a template for the archive of our CPT called "ctc_sermon_archive" and we added dscl-custom.php in the templates folder
  3. This gets it to show the right template for us (for the archive), but now it is combining that template with a bunch of other templates

Hoping this helps as a roadmap to help you guys get this fixed as soon as possible. [Uploading live-composer-page-builder.zip…]()

bandicootmarketing commented 8 years ago

I can also take screencasts to show you what we have if that would help.

bandicootmarketing commented 8 years ago

Any updates here? We are having to use a big workaround (in files attached above) until this is fixed.

delorimier commented 8 years ago

@lukeperrie - can't find your custom filter.php code.

bandicootmarketing commented 8 years ago

@delorimier see attached. filters.zip

delorimier commented 8 years ago

@lukeperrie I think your code should make the first and third options your CPT name plus "_archive" ("ctc_sermon_archive"), and the second option the CPT name only, "ctc_sermon". This works well for me, thank you for the insight.

If this is all that is needed, some sort of functions.php filtrer could probably be added easily in a future LC release.

I did not add any .php templates, just added a new LC template in "appearance:templates lc" and checked the custom CPT (archive) checkbox. I resaved WP permalinks a few times, but that might not be necessary in your case. You should perhaps resave those LC templates to make sure no duplicates are registered in the database - your previous code might have done that.

bandicootmarketing commented 8 years ago

@livecomposer @lumberman was this fixed in the new beta version?

delorimier commented 8 years ago

Have not installed the beta version. Things are working quite well with a few modifications. Thanks again for your input. Let me know if I can help.

bandicootmarketing commented 8 years ago

@delorimier - thanks man. I was just hoping that it was fixed by the LC team permanently so we could stop using our workaround.

lumberman commented 8 years ago

Guys I need your help with testing.

Plugin version to test

Please, try the next version and let me know if the problem solved: https://github.com/live-composer/live-composer-page-builder/archive/issue/319.zip

Things to check:

You can create Custom Post Type and Custom Categories using free WCK - Custom Fields and Custom Post Types Creator plugin.

Case A: How to add your CPT into Live Composer templating system


    function custom777_add_cpt_to_lc_templates( $cpt_with_templates ) {

        $cpt_with_templates['case_studies'] = 'Case Studies';

        return $cpt_with_templates;
    }

    add_filter( 'dslc_post_templates_post_types', 'custom777_add_cpt_to_lc_templates' );

Case B: How to make your CPT editable in Live Composer without templates (aka regular page)


    function custom777_make_cpt_editable_in_lc( $editable_cpts ) {

        $editable_cpts['plugin'] = 'Plugin';

        return $editable_cpts;
    }

    add_filter( 'dslc_enabled_cpt', 'custom777_make_cpt_editable_in_lc' );

Thanks for your help!

bandicootmarketing commented 8 years ago

Hey @lumberman - is this a part of the 1.1.5 master branch now? We tried to roll up to 1.1.5 on our multisite network the other day (in order to see fixes for stuff like the "developer mode" export not working and such,) and we had several issues that it caused. I know that's vague, but I'm just letting you know that I'm not sure we are going to be able to update to 1.1.5 any time super soon. I'm just starting to bring on beta customers into our network and I can't risk the breakdown right now.

Is the new code to JUST fix this issue easily identifiable? I'd like to possibly have my lead dev take a look and see if we can just grab it out of 1.1.5 and update our current 1.1.4 version with only that.

lumberman commented 8 years ago

Hi @lukeperrie, no, these changes are not in the master branch until I'm sure they are working properly.

You are not supposed to test/install beta plugin versions on the live website. This update has very important changes to the page code structure (JSON instead of serialized data) that will allow us to do JS only live module edits without waiting for Ajax responses from the server. It will also allow us to put modules inside modules (more features for rows and containers). These features were not possible to implement in the old version.

I believe it's your and other developers best interest to test beta versions and find bugs before it released to the public. It shouldn't take more than 30 mins to fully test it with your CPT. At the moment we have no money to hire QA team or additional developer who will be writing complete automated tests.

As always your help is much appreciated, but it's ok if you can't find time for that testing now.

bandicootmarketing commented 8 years ago

Hey @lumberman - of course - we know not to test in live environment :-). We just haven't created a completely separate sandbox environment yet to test things like this. Unfortunately at this point our team does not have the time to create a sandbox environment to test things like this. We're just gonna have to use our existing workaround that we created until someone else has tested these and they get pushed into the Master Branch. I'm really sorry that we can't help more with the testing - I wish we could!

delorimier commented 8 years ago

I will test tomorrow and report back, thank you. The module inside module concept seems very promising.

delorimier commented 8 years ago

@lumberman - Great job!

Not tested (my site currently does not use these)

Minor issues:

LC is amazing, thank you. Any idea when these new features can be used on live site?

lumberman commented 8 years ago

Thank you @delorimier. I plan to have update published on Tue/Wed next week.