• Hello,
    I got someone to do a bit of custom coding to make a sidebar and I think this is the reason I am now having trouble switching themes. When I try I get this error:

    Fatal error: call to undefined function getClassAlign() in /home/articlemundi/public_html/wp-content/plugins/fusion-core/shortcodes.php on line 2874

    Could anyone help me solve this?

    Here’s what it says on lines 2871 – 2875 . . .
    71: $current_post_id = get_the_ID();
    72: $html .= ‘<div id=”post-‘ .$current_post_id.'”‘;
    73: ob_start();
    74: post_class($post_class.getClassAlign($post_count).’ clearfix’);
    75: $html .= ob_get_clean() .’>’;

    Thanks so much, this would really help me,
    Sincerely,
    Max

Viewing 3 replies - 1 through 3 (of 3 total)
  • The custom getClassAlign() that was written for you might have been put into your old theme’s functions.php file.

    When you install a new theme, you will get a new functions.php for that theme.

    If this is the case, then you can open up your old theme’s functions.php, which should be located in /your-wp-install-directory/wp-content/themes/your-old-theme-name/functions.php

    Copy the code for the getClassAlign() function from there, and then put into your new theme’s functions.php.

    If this doesn’t help, then please provide a link to your site if you can, and what theme you are using.

    Thread Starter mhilmer

    (@mhilmer)

    There is no getClassAlign() in the functions.php of my old theme, but there I found it in Avada(my old theme)/framework/custom_functions.php.

    Should I add this to my new theme? If so, should I just add it do the functions.php, or their framework php?

    Thanks so much for your help!

    website:
    https://www.articlemundi.com

    Sincerely,
    Max Hilmer

    If you are switching from Avada (ie, your theme will no longer be Avada), then most likely you will not be able to use the Fusion Builder plugin that Avada apparently comes with. And I’m guessing it’s Fusion Builder just from the directory structure of where your error is being generated.

    If you deactivate the plugin, you should no longer have that conflict. I also suspect that whatever code is in getClassAlign() would not actually be viable in your new theme, anyway.

    I can’t say that 100% though, because Avada is a paid theme not available from the Themes area of a self-hosted WordPress install. In other words, if you can’t install a theme for free from the admin area, it’s not generally supported here in the www.remarpro.com forums.

    Having made that obligatory disclaimer lol, let’s continue.

    There is a very popular plugin called Page Builder that similarly does what Fusion Builder seems to do. If you have a site with pages built using Page Builder, and you deactivate that plugin, it seriously screws with your site’s look and feel. The point is that if you deactivate Fusion Builder (if it even works in your new theme, which I hope it will), you will have problems.

    The best way to handle all that is to have you post the code from getClassAlign() here. I will take that code and make it to where all it does is pass back what was passed to it, effectively doing nothing but still being available to be called.

    For the sake of compatibility, I would put the new getClassAlign() I give you into your new theme’s functions.php. Not every theme has a \framework\ folder, and just about every theme has a functions.php registered into WordPress.

    A lot of the above may not even apply since I can’t replicate your old stuff ha, but let me know how it progresses, and we’ll go from there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble switching to new theme because I customized plugins’ is closed to new replies.