• Resolved Ed

    (@eammendola)


    I did read and try the workaround posted here: https://wordpress.org/support/topic/posts-invalid-template-name-after-update/

    I do understand what you said to do. I moved my custom-default-loop.php file from wp-content/themes/mytheme/shortcodes-ultimate/ to wp-content/themes/mytheme/ folder, then I deleted the shortcodes-ultimate folder from wp-content/themes/mytheme/ folder.

    However, I am still getting the invalid template name error, even after clearing cache and hard refresh of browser.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi @eammendola,

    Please post here the following:

    – the full actual path of your custom template
    – your posts shortcode code

    Thank you.

    Thread Starter Ed

    (@eammendola)

    Here is the information Vladimir.

    Actual path:
    \www\intranet\wp-content\themes\hospice-alliance\custom-default-loop.php

    Shortcode:
    [su_posts template=”custom-default-loop.php” posts_per_page=”10″
    tax_term=”22,21,73,20,23,130,255,256″ order=”desc”]

    Plugin Author Vova

    (@gn_themes)

    Hi @eammendola,

    can I ask you to do one more thing?

    Please paste the following code to the end of the /wp-content/plugins/shortcodes-ultimate/shortcodes-ultimate.php file:

    add_action( 'admin_notices', 'vanokhin_admin_notices', 10 );
    
    function vanokhin_admin_notices() {
    
    	if ( ! current_user_can( 'manage_options' ) ) {
    		return;
    	}
    
    	printf(
    		'<div class="notice"><pre contenteditable="true">stylesheet_dir:%s<br>template_dir:  %s<br>plugin_path:   %s<br>realpath:      %s</pre></div>',
    		get_stylesheet_directory(),
    		get_template_directory(),
    		untrailingslashit( plugin_dir_path( dirname( __FILE__ ) ) ),
    		realpath( untrailingslashit( plugin_dir_path( dirname( __FILE__ ) ) ) )
    	);
    
    }

    Then go to Dashboard and copy text from displayed admin notice. This is how it will look like – https://i.imgur.com/FE8aiz4.png

    Thank you.

    Thread Starter Ed

    (@eammendola)

    Vladimir,

    I had to modify the script or it would error out, but this is the output:

    stylesheet_dir: C:\wamp64\www\intranet/wp-content/themes/hospice-alliance
    template_dir: C:\wamp64\www\intranet/wp-content/themes/spacious
    plugin_path: C:\wamp64\www\intranet\wp-content\plugins
    realpath: C:\wamp64\www\intranet\wp-content\plugins

    As you can see, I am using WAMP on Windows.

    Plugin Author Vova

    (@gn_themes)

    Hi Ed,

    thank you. What was the error?

    Thread Starter Ed

    (@eammendola)

    This is the complete error.

    Posts: invalid template name

    Thread Starter Ed

    (@eammendola)

    Is it a problem if the slashes in the paths are going different directions like this? I notice this in only two of the paths.

    stylesheet_dir: C:\wamp64\www\intranet/wp-content/themes/hospice-alliance
    template_dir: C:\wamp64\www\intranet/wp-content/themes/spacious

    Plugin Author Vova

    (@gn_themes)

    I’ve updated the plugin but the version number isn’t changed. Could you reinstall the plugin and check the posts shortcode again?

    Thank you.

    Thread Starter Ed

    (@eammendola)

    Vladimir,

    Yes this is working for me now.

    Thank you.

    Plugin Author Vova

    (@gn_themes)

    Thank you for helping me out.

    Smat Placid

    (@www_smatplacid_com)

    Same here – reinstall helped. Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘5.4.1 upgrade breaks Shortcodes Ultimate / Posts: Invalid template name’ is closed to new replies.