Skip Navigation

[Resuelto] Custom cell and is_page value

This support ticket is created hace 6 años, 11 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

Este tema contiene 9 respuestas, tiene 2 mensajes.

Última actualización por Minesh hace 6 años, 11 meses.

Asistido por: Minesh.

Autor
Mensajes
#599842

I am trying to display result of breadcrumbs php function via custom cell. This function is placed in functions.php. Everything works fine, when I use custom cell in prepared layout. I can change layout use and join it to one concrete page. But when I create a new blank page, edit it with Layouts, add my custom cell, then I have no result.
I am using wordpress functions like is_page(), is_single(), is_archive(), etc.
Is there any difference or limitation of using Layouts when I create new page versus when I join page to existing layout?
Thanks in advance.

#600091

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I need more details on your issue on how you setup your page and what you've added to your functions.php file.

Could you please share problem URL where you added custom cell?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#600497

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Thanks for sharing access details but unfortunately wp-admin access details are not working.

Could you please resend to me once you check its working.

I have set the next reply to private which means only you and I have access to it.

#600796

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Thanks for sharing access details.

I checked on your install and I see there is a custom shortcode added to functions.php file "bread" is this shortcode responsible for displaying the breadcrumb?

If yes - I would like to know where you added the shortcode "bread" ? to which PHP template file? Is SEO page using PHP template where you try to implement custom layout cell?

#600801

I was testing this breadcrumb via Visual editor cell and it works. Question is, why the same shortcode doesn't work in custom cell (using do_shortcode function).

#600804

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

WEll - that is why I'm asking to which custom cell you've added the custom shortcode.

Could you please share the layout link and cell you are using to which you've added the custom shortcode?

As I edit the layout for SEO page and I do not see in any cell there is added custom shortcode.

#600806

Shortcode is used in section-intro.php, but it has same result as direct call to function without shortcode.

#600813

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Well - I checked now and I see you are echoing the custom shourtcode output. You've added custom cell correct way and its functioning on backend and you are able to add/remove custom cell when you are building layout.

Now, regarding the custom shortcode, I would love to help you further but to debug such custom programming is beyond the scope of our support policy. If you need custom programming for your project, please feel free to contact our certified partners:
=> https://toolset.com/contractors/

#600879

The whole custom function can seem difficult, but it doesn't work also with this simple example:

if ( is_page() ) {
echo 'This is page';
}

Function is_page() is wordpress default...

#601132

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Well - If you are talking about integrating layout with your theme's PHP template, please check this:
=> https://toolset.com/documentation/user-guides/develop-layouts-based-themes/#php-integration-for-layouts

Your theme template should be using the_ddlayout() function to display the layout, you should check Toolset starter theme for more details.

For any custom requirement, please feel free to contact our certified partners:
=> https://toolset.com/contractors/