Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think what euforico means is that he has the custom field set up for the src of an image for example.

    <img src="<?php echo get_post_meta($post->ID, 'my_name', true); ?>" alt="Alt Text" />

    I know what I want but my php code is very inadequate.

    You need something like:

    if the custom field is not empty, display this:

    <img src="<?php echo get_post_meta($post->ID, 'my_name', true); ?>" alt="Alt Text" />

    if it is empty, display this:

    <img src="https://www.blog.com/path-to-generic-image.jpg" alt="Alt Text" />

    One of the problems that people complain to me about this is that when a user doesn’t add email address, etc as suggested above, Everthing that has been written disappears.

    One client I have said she spent an hour typing a response (must of been a long one…), forgot to put in the email address and lost everything.

    I too would like a better solution to this quite simple usability problem.

    i am an idiot. I looked everywhere in the codex for that, but didnt look one line further down in the options menu. That is fantatsic. I new that would be simple, but not that simple.

    That was my first post in these forums, but I have become a pretty handy WP user because of all the advice that you guys donate.

    Thank you all for the time and effort that you put into developing and helping us all.

    So on this same point, If I set the home page to be a specific page (accessible by https://www.mydomain.com/), how would I create a link to the latest posts?

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