Instead of using $post, how do i get the thumbnail image of the $post

To grab the img tag as a variable: get_the_post_thumbnail ( int $post_id = null, string|array $size=”post-thumbnail”, string|array $attr=”” ) or if you want to outright echo it: the_post_thumbnail ( string|array $size=”post-thumbnail”, string|array $attr=”” ) Most things like the post content, excerpt, title etc, are acquired using functions like this so that filters and hooks can … Read more

Using ACF Custom Field value in a URL with do_shortcode() [closed]

Simply you need to replace the_field(‘video’) with get_field(‘video’). Why? Because according to ACF documentation; get_field($field_name, $post_id, $format_value) Returns the value of the specified field. Whereas on the other hand the_field($field_name, $post_id) Displays the value of the specified field. (this is the same as “echo get_field($field_name)”) Hope this might help others as well.

How To Change the URL of a WordPress Multisite

These are the .htacess rules that fixed it. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] #RewriteRule ^(.+)?/(wp-.*) /$2 [L] RewriteRule ^(.*?)/(wp-.*) /$2 [L] RewriteRule . index.php [L]

Using permalinks with parameters

id is already used by WordPress, it’s a query variable and a reserved name. If you put ?id=5 on the end of a URL, you’re asking for the post with ID 5. Instead, have you considered using a person post type? This would give you an archive, add/edit screen, admin listings, templates, individual person templates, … Read more

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