Function to retrieve a picture if there is no picture is attached

Test the value before you use it: <?php if ( ! $img = get_field(‘img_actor’, get_the_ID() ) ) $img = ‘http://www.example.com/wp-content/uploads/default.jpg’; ?> <img class=”film” src=”https://wordpress.stackexchange.com/scripts/timthumb.php?src=<?php echo urlencode($img); ?>&h=251&w=175&zc=1″ alt=”<?php the_title_attribute(); ?>” title=”<?php the_title_attribute(); ?>”/> I recommend not to use the same text for title and alt, this is very annoying for screen reader users.

Incorrect data after modifying post using backlink from wp_die

I don’t know why this issue occurs. The back_link is created in /wp-includes/functions.php. If there were a Javascript solution, it could be applied in the message of wp_die. For example: $msg = ‘Error’ . “\n<p><a href=”https://wordpress.stackexchange.com/questions/80375/javascript:history.go(-1)”>$back_text</a></p>”; wp_die($msg, ‘Error’, array( ‘response’ => 500 )); But this didn’t work… What I saw is that the Title and … Read more

How can i get the actor birthday by date?

For this to work you need the date stored in the database to match the $todaysDate and it probably doesn’t. If I am reading your somewhat confusing question correctly then you are storing dates like 20th Jan 2013 but you are matching it against a date that looks like 0120 (January 20). Even if you … Read more

How do i get a specific user metadata using custom metavalue outside of wordpress?

If you have billing_phone as user meta, which is the preferred way, that query would be incorrect. The advantage of utilizing custom user meta and adding a field for billing_phone would allow you to use get_users(). $user = get_users(‘meta_key’ => ‘billing_phone’, ‘meta_value’ => $phone_number, ‘fields’ => ‘ID’); The above would give you an array of … Read more

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