Showing fields only if they are filled / auto fill them
-
Hello,
I am a newbie to wordpress and trying to create a site at
- newlayout.tribe-online.de
. I am using Atahualpa 3.7.3 with the latest WP release.
I created custom fields by using the Advanced Customs field plugin. Afterwards I created an widget to display the fileds on certain pages. So far i could figure myself, but still there are some things left that I cannot complete as I do neither figure the right php code to use nor the proper link/address within wordpress:
The first problem is now that the box appear over the line of social buttons from the Tracking social sharing PI – any clue how I can prevent this, the plugin is set to post only underneath the posts!?
I want to call up images from the media gallery and let the author in the backend choose what to display.
There is a a field called USK (the age rating) which is multiple choice (0,6,12,18) that the author has to select.
I would want now that this he USK field now triggers display of the related picture in the wp media gallery for the usk_logo
Currently I am using the following code to display the image:
<img src="<?php the_field('usk_logo');?>" width="90" height="90" align="absmiddle">Furthermore the field Cover could be the actual article pic that also shows in the excerpts. Current Code is:
<img src="<?php the_field('Cover'); ?>" width="94" height="150" align="absmiddle">And last but not least how can I trigger the fields to only display in the frontend if the actual field is filled?
The remaining coding is:
<?php the_field('spielname'); ?>
Entwickler: <?php the_field('enwickler'); ?>Erschienen bei: <?php the_field('publisher'); ?>
Preis: ca. <?php the_field('preis'); ?> EuroThank you
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Showing fields only if they are filled / auto fill them’ is closed to new replies.