Dashboard - error calling x_featured_image()

Hiya,

I have this simple bit of code that is throwing an error when we update any of the pages that call this function.

Latest version of Wordpress and Version: 6.2.5 of Xtheme - this has been happening since WordPress 5.0 and only happening in the dashboard

<a href="<?php the_permalink(); ?>"><?php x_featured_image(); ?></a>

Hi @webcoursesbangkok,

Thanks for reaching out.

How did you add that code to your child theme, the possible reason is your code is executed earlier before even the parent theme loaded the function x_featured_image. Or parent theme is corrupted, I recommend re-installing your theme manually (please check this https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 Manual Updates ).

That should make sure the correct files are uploaded and installed.

The function x_featured_image is located in the file \framework\functions\frontend\featured.php so it shouldn’t trigger that error.

Thanks!

Oh wow what a quick reply.

Yes we have a file called course-loop.php in the child theme.

May I ask how re-installing the theme manually will help?

Hi @webcoursesbangkok,

It should be the same as manually installing the update. Please check this article https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 in the Manual Updates > Manual X Update Via FTP section, or Manual Updates > Manual X Update via the WordPress Dashboard section.

Thanks!

Rad,

I asked why this will help?

Why will doing a manual update of the parent them help this issue?

C

Hi There,

Can you send us the full code of loop-course.php file?

I’ve tried the x_featured_image() it’s working fine on my end.

Please also try these steps:

  1. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
  2. Remove custom PHP code from the Child Theme and test the case.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.