the_ausswe
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Developing with WordPress
In reply to: Call custom field in functions.phpSo 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.
Forum: Installing WordPress
In reply to: How to correctly install WordPress in it's own (sub) directoryThanks 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
Forum: Plugins
In reply to: Error: "Warning: fileperms() [function.fileperms]: stat failed …" line 871I 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)