Skip Navigation

[Resolved] cred_link_form not working – for BEDA

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.05 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 3 voices.

Last updated by Beda 8 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#426694

This is a continuation of the problem here:

https://toolset.com/forums/topic/cred_link_form-not-working/page/2/

While waiting for a response, my business partner and I have purchased Toolset under this ID (my personal ID while evaluating was MichelleM5160)

I have tried adding the following to my child theme functions.php

/** Make sure the editing mechanism works **?

add_filter('get_layout_id_for_render', function($id, $slug){
         
        global $post;
  
        if( null !== $post && $post->post_type === 'listing' && isset($_GET['cred-edit-form']) ){
            $id = '5904';
        }
        return $id;
} );

but there is no change - the editing page still shows the actual post with the CRED form in the description area.

Please can BEDA take another look

Thanks

Michelle

#426843

Hi Johanna,

This is Mohammed, the Toolset support team leader.

Beda already finished his shift and of course, he will get back tomorrow to continue his work.

I'm forwarding this to him so that he can take care of it.

Thanks.

#426961

This works fine.

1. Create a Layout with slug "cred-edit-form"

2. Manipulate your Current layout with which you link to the CRED Form and insert the CRED edit Link

3. In the Layout "cred-edit-form" insert the CRED Edit Cell

4. Insert in your theme's functions.php this:

add_filter('get_layout_id_for_render', function($id, $slug){
         
        global $post;
  
        if( null !== $post && $post->post_type === 'post' && isset($_GET['cred-edit-form']) ){
            $id = '31';
        }
        return $id;
} );

Note that you need to change "post" in post type to your Slug of your Post Type you edit.

This will work, it will render the CRED form with your Layout "cred-edit-form" and not with the Layout used to create the actual contnet and display the link.

I tested this locally.

Maybe, to make a clean test, try to create a Layout with the Link to the form only, and a Layout as instructed, with the CRED Form Cell only.

Then, if that does not work, it is something in the server or on your Theme, as this works fine locally.

If all fails, please add the Access Details below.

#429114

Your CRED Edit Form Layout has ID 6190

Why are you calling ID 6011 in your Code?

If that does not fix the issue, can you try to deactivate "Toolset Classifieds" Plugin to test it?

It might be that this code in the Plugin is interferring with the new one.

Let me know if this solves the problem. We might then need to enhance the above Code.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.