Redirecting to an external URL

Use is_user_logged_in() to show link only or logged in users. And use the_author_meta() to get url to google drive. Like this inside The Loop: <?php if(is_user_logged_in()): ?> <a href=”https://wordpress.stackexchange.com/questions/201838/<?php the_author_meta(“google_drive_url’) ?>”>Click to open Google Drive</a> <?php endif; ?>

Append custom field items to content from plugin

You can use the the_content filter to add code directly into the content. add_filter( ‘the_content’, ‘wpse_202010_modify_the_content’ ); function wpse_202010_modify_the_content( $content ) { global $post; if ( in_array( $post->post_type, array( ‘post’, ‘page’ ) ) ) { $content=”<p>New content here</p>” . $content; } return $content; }

Get file size from ACF repeater field

As far as I know, WordPress has nothing built in for this, I would just do. Same thing did you also. So make sure that the $attachment_id having value. You can use custom function by place that function code in your function.php file. function getSize($file){ $bytes = filesize($file); $s = array(‘b’, ‘Kb’, ‘Mb’, ‘Gb’); $e … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)