Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter the_ausswe

    (@the_ausswe)

    So it looks like I managed to get it sorted! In case someone else is trying the same here is the code I ended up with:

    function googlesheetpdf_shortcode() {
        $googleurl = get_post_meta(get_the_ID(),'do_googlesheet', array( 'output_as' => 'text' ));
        if (pll_current_language() == 'sv') {
        return> '<a href="' . $googleurl . '/view#gid=0">Spara som PDF</a>';
         } else return '<a href="' . $googleurl . '/view#gid=146971">Save as PDF</a>';
         }
    add_shortcode('googlesheetpdf', 'googlesheetpdf_shortcode');
    • This reply was modified 4 years, 3 months ago by the_ausswe.
    Thread Starter the_ausswe

    (@the_ausswe)

    Thanks for clarifying that – so wouldn’t it be best to delete the .htaccess in the sub-directory?

    And I was also thinking of “manual input” into the .htaccess dealing with WordPress – for example I added this according to the WP Forum to help hardening WP:

    # Block the include-only files.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
    </IfModule>
    
    # BEGIN WordPress

    I got the same error and it started when I moved my WP installation to a sub directory.

    Noted that I didn’t have the index.php in the new folder, copied that from the root and after the plugin updates seem to work.

Viewing 3 replies - 1 through 3 (of 3 total)