• Hi there,
    I’m trying to add a new post-type in the Nash template, but have run into a fatal error that I’m finding no reference to via Google AT ALL!

    Fatal error: Cannot redeclare gt_save_images() (previously declared in /path/wp-content/themes/nash/functions/theme-videometa.php:578) in /path/wp-content/themes/nash/functions/theme-portfoliometa.php on line 599

    The line in this spot in both of files states:

    $.post(ajaxurl, { ids: '', action: 'gt_save_images', post_id: gt_ajax.post_id, nonce: gt_ajax.nonce });

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Where did you download the theme from?

    You may want to contact the theme’s author.

    Moderator bcworkz

    (@bcworkz)

    Something strange is going on, the referenced line is jquery, not PHP. It should be a text string in a PHP file so that the parser doesn’t really even “see” it. The action value ‘gt_save_images’ is supposed to become part of an action hook where the AJAX call gets routed to, it should not be used to define a function.

    I can’t imagine how this gets transformed into a function redefinition or why it only manifests itself when a CPT is added. I doubt anyone here can sort this out without a complete copy of the theme, so as Tara suggested, the author is the only reasonable resource.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error: Cannot redeclare gt_save_images()’ is closed to new replies.