WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Positioning the Fields (3 posts)

  1. wtfbingo
    Member
    Posted 1 year ago #

    I have taken over the maintenance of a website I did not build. The owner wants me to add some custom fields to the ad space on the home page. I've figured out how to add the custom field, and how to place it into the template, but I have NO idea how to style it (position it, etc). He also wants me to change the appearance of an element that is already there.

    Is there a tutorial or something that can help me find out where to define these things? I cannot figure this out for the life of me.

    http://www.blueoceanminerals.com

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. Dani-Girl
    Member
    Posted 1 year ago #

    You can style through CSS in your template. The custom field is just returning text, or a URL or simple HTML

    example

    <div class="style1">
    <?php the_field('yourfieldname'); ?>
    </div>

    Css:

    .style1 {
    font-family: 'Courier';
    	overflow-x: hidden;
    	background-color:#141414;
    	background-image: url('bg.png');
    	background-repeat: repeat-x;
    	background-position: center top;
    }
  3. wtfbingo
    Member
    Posted 1 year ago #

    Thanks, Dani. It was way simpler than I thought!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic