Support » Plugins » Hacks » Showing fields only if they are filled / auto fill them

  • Hello everybody

    I am using Atahualpa 3.7.3 with the latest WP release on the test domain

    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'); ?> Euro

    Thank you

  • The topic ‘Showing fields only if they are filled / auto fill them’ is closed to new replies.