Skip Navigation

[Resolved] I have a issue when i add a custom code.

This support ticket is created 5 years, 2 months 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by DavidZ1525 5 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1320531
Configuración ‹ LuxFlow - LuxFlow - Mozilla Firefox 2019-08-20 15.17.13.png

Tell us what you are trying to do?
I want to disable a code that I add. I can't because it has a issue. I put it in safe mode to disable all the codes but it didn't work either.

Is there any documentation that you are following?
This documentation https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/?utm_source=typesplugin&utm_medium=plugin&utm_campaign=product&utm_content=codesnippets

Is there a similar example that we can see?

hidden link

What is the link to your site?
hidden link

#1320595

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for getting in touch.

This one to me seems as if its a plugin conflict with the constant loading when trying to add the custom code.

Could you temporarily disable all the non-toolset plugins and try again to see if you are still unable to add the custom code.

Thanks,
Shane

#1320609

Hi Shane..

I disable Toolset Types Plugin and Toolset Views Plugin and still with the problem.

#1320619

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Would you mind allowing me to have admin access to the site to check on this for you ?

Thanks,
Shane

#1321223

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

I tried going to the link you sent but it keeps redirecting me to hidden link

Could you check on this and let me know when I can access the login page ?

Thanks,
Shane

#1321231

Hi..
hidden link

Please try and tell me.

#1321253

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

HI David,

Still the same results.

However can you check your website javascript console by inspecting the page element where the issue is occurring and let me know if you see any errors appear in the console?

Thanks,
Shane

#1321265

You can try this URL
hidden link

You also have what you tell me.

#1321279
Configuración ‹ LuxFlow - LuxFlow - Mozilla Firefox 2019-08-21 10.48.44.png

Check please..

#1321303

I need to solve that issue as soon as possible. It is important for the advancement of my work.

Thank you.

#1321567

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Unfortunately i'm still getting redirected to the homepage.

As an alternative to adding custom code to your site you can always add them to your functions.php file so it should be causing such a delay in your work.

Also you can install the plugin below
https://wordpress.org/plugins/my-custom-functions/#description

This can allow you to add custom php codes to your site as well.

Please let me know if this helps.

Thanks,
Shane

#1321599

Hi Shane..

I am using Code Snippets for i add code. I add this code

function tssupp_remove_toolset_buttons(){

if ( !empty($GET['pid']) ) {
// remove the Fields and Views button
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
}
}
add_action( 'init', 'tssupp_remove_toolset_buttons' );

but this code is not work well..

hidden link

#1321611

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Try changing $GET['pid'] to $_GET['cid']

This should resolve the issue.

Thanks,
Shane

#1322535

Hi Shane..
I am using this code

function tssupp_remove_toolset_buttons(){

if ( !empty($_GET['cid']) ) {
// remove the Fields and Views button
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
}
}
add_action( 'init', 'tssupp_remove_toolset_buttons' );

and still not working well. In some pages it works well and in others it does not.

hidden link

#1323085

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

From your video I can see that some of your pages use a PID intead of CID

So modify your function like this.


function tssupp_remove_toolset_buttons(){

if ( !empty($_GET['cid']) || !empty($_GET['pid']) ) {
// remove the Fields and Views button
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
}
}
add_action( 'init', 'tssupp_remove_toolset_buttons' );

Thanks,
Shane