Skip Navigation

[Resolved] Not shown template on custom type

This support ticket is created 3 years, 7 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+00:00)

This topic contains 24 replies, has 3 voices.

Last updated by Jamal 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#1780365

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

We are not allowed to communicate with any party beyond our forum. Our compatibility team on the other hand is responsible for contacting 3rd party plugins' authors.
But before I can escalate to our compatibility team, I'll need to reproduce this on our platform on a clean install.
Unfortunately, we only have WordPress based installation. Let me check with our 2nd Tier on how we can handle this special case and get back to you.

#1780367

Hi,

Thank you very much for that

Regards

#1781675

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello again,

What we found so far, is that the themes that are inside of the WordPress folder(wp-content/themes) are not used at all. Check this example hidden link If we search for "article" we should find at least one that is defined in the file wp-content/themes/fishpig/content.php

Instead, it seems that the Magento module that is outside of the WordPress folder that is being used, the one I shared previously. hidden link located here /srv/public_html/vendor/fishpig/magento2-wordpress-integration/view/frontend/templates/post/view.phtml
This file does not use "the_content()" function.
I'll suggest following the documentation article that you shared previously to create your own templates hidden link
Your templates should be in this folder according to the article /app/design/YourCustom/Theme

Then copy the original fishpig template and replace "echo $content;" check this screenshot hidden link with

echo apply_filters( 'the_content', $content );

This might work, but we are not sure, because of this highly customized setup.

You may also change the "echo $content;" with:

echo the_content();

If this did not help, we believe that the integration module support is the one who can say hot to get it to work.
We remain at your disposal for any additional questions.

#1781831

Hello,

Too complex for me. I'm not technical on this and this is a business so I need to have a company behind any code.

Could you please elevate the issue to see if someone on your team can integrate with this theme on an easy way?

Thanks

#1782473

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello,

Actually, I can escalate this anymore. As you can see in our support policy, we are limited on the amount of custom code we can provide. https://toolset.com/toolset-support-policy/

In my opinion, the person/company that can help you with this should have technical skills in Magento, and some knowledge about WordPress development. I am afraid a WordPress agency may lake the Magento knowledge to help here.

All the best,
Jamal

#1782475

Hello,

I don't understand what you mean. Are you going to escalate to another team that is going to try to integrate?

If not, I'm afraid I would need a refund because there are other alternatives that works and I have no time now to integrate this with an agency

Thanks

#1782511

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello,

I am really sorry, I can't escalate this to any other level of support. Our 2nd Tier thinks that this a highly custom setup and therefore is out of the scope of our support.

To ask for a refund, please use the second link on this page https://toolset.com/buy/refund/

All the best,
Jamal

#1782981

Hello,

I don't really understand why the majority of the plugins works and this not

I have the following plugin installed that handles all shortcodes

/srv/public_html/vendor/fishpig/magento2-wordpress-integration-pluginshortcodewidget
hidden link

I've had the following conversation with Ben, you may want to look at this with your team and try to fix on the last try

------------------------------------------
When a call to $post->getContent() is made, this includes the WordPress code and calls the_content: hidden link

------------------------------------------

Hi Ben,

Thanks, yes, I do

I'll report them.

Meanwhile, what would be the function or path + function that I would need to add here hidden link from theirs settings to try if it works

It seems that should work by default with this installed. Where are located this code here /srv/public_html/vendor/fishpig/magento2-wordpress-integration-pluginshortcodewidget? to provide them

Thanks

--------------------------------------------
Hi Nestor,

There isn't a simple function that you can enter in that field.

I don't know if their plugin will work. The majority of plugins (Elementor, WP Bakery, Contact Form 7, Gravity Forms, Rev Slider etc) that use shortcodes or the_content all work when using fishpig/magento2-wordpress-integration-pluginshortcodewidget without any extra changes/customisations. If this plugin is not working, then it must work in a way that is not compatible with the integration.

If you want to change how custom post type's work, you should use Custom Post Type UI:

hidden link

This is a free plugin that lets you setup custom post types and taxonomies.

If you want to change how a post type looks on the frontend, you need to do this via Magento anyway and not via WordPress as you are now integrated into Magento and Magento handles the frontend design.

The following link provides the layout XML handles that might be useful for custom post types:

hidden link

This applies to the post type archive page.

The following link provides layout XML handles for everything else (including custom post type view pages):

hidden link

Thanks

#1786153

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Nestor

I have a meeting with the developers in the morning, and I will discuss it with them to see whether we can proceed with this.

But it doesn't look promising. The message you just shared from the developer Ben states

"If you want to change how a post type looks on the frontend, you need to do this via Magento anyway and not via WordPress as you are now integrated into Magento and Magento handles the frontend design."

Changing how a post type looks on the front-end is exactly what you are using Toolset for, and according to the developer it should be done with Magento and not with WordPress.

I'll report back when I have discussed with the developers.

#1787279

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I'm afraid I don't have a solution for you other than that which Jamal already shared.

As the Magento WordPress Integration documentation (hidden link) states "The WordPress theme is not responsible for the front end display of your blog and all design changes must take place in Magento 2."

The developer Ben confirmed the same in his communications with you: "If you want to change how a post type looks on the frontend, you need to do this via Magento anyway and not via WordPress as you are now integrated into Magento and Magento handles the frontend design."

This problem doesn't necessarily arise with other plugins which are not necessarily changing how post content is displayed.

The requirement for Toolset templates to be able to override what would normally be output by the theme is clear: the theme needs to pass the content through the WordPress filter the_content, which happens in nearly all themes that follow the normal WordPress pattern of outputting the post body using the function the_content. We have a workaround where you can register a custom function used by a theme to output the post body if it does not use the_content.

In this case the Magento theme doesn't use the_content function to output the post body, and as Ben states, it doesn't use a named custom function instead that can be registered for the workaround. Which means the only alternative is to edit the Magento templates and where the post body is output replace its non-standard method with the standard the_content() function, or try passing its content through the_content filter manually.

That was described by Jamal here: https://toolset.com/forums/topic/not-shown-template-on-custom-type/page/2/#post-1781675

You replied that you are unable to do that, and that's where we are stuck. It's the only solution that we can offer, and we cannot customise Magento theme files for you. If you don't have access to a developer that can make such minor edits then Toolset isn't going to work, I'm afraid, and you'll need to solicit a refund, which you can do from your account page.

#1787857

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

We are really sorry for not being able to help further.

Good luck with your project.

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