Custom field is below the post in Directory listing

Hi,

I'm using Custom press for an extra field containing the address.
Within the Directory plugin the field is below the listing and the rating.
Please see the highlighted text in the image.

I would like to display it above the ratings, so it's part of the listing.

  • Kimberly
    • Champion of Loops

    Hello jongag1

    You will need to insert the embed code within the page template that your Directory is using.

    If you are using the Child theme then you will have to put it into single_post.php I believe. Somewhere within the loop.

    If you are not using that theme then you can copy that file and add it to your theme files and customize it there.

    Let me know if you need anything more :slight_smile:

    Best,

    Kimberly

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

  • Kimberly
    • Champion of Loops

    To display the Directory it is, yes.

    Did you then place the embed code below that in the editor?

    If you want it to show up in the actual listing you will need to have it inserted into the actual page template file that Directory uses to generate the listing.

    Does that clarify a bit?

  • jongag1
    • The Crimson Coder

    When I put the embed code below that it show's as text only :slight_smile:

    I'm using the Daily theme and I'm using a child theme for the changes I made.
    I copied single.php to the child folder and changed it:

    <?php get_header() ?>
    	<div id="content">
    		<div class="padder">
    			<?php if($bp_existed == 'true') : ?>
    				<?php do_action( 'bp_before_blog_single_post' ) ?>
    					<?php endif; ?>
    			<div class="page" id="blog-single">
    					<?php if (have_posts()) :  ?>
    						<?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    							<?php bp_wpmu_singleloop(); ?>
    													<?php echo get_post_meta( $post->ID, 'ct_Straatnaam_text_c7a7', true ); ?>
    													<?php echo get_post_meta( $post->ID, 'ct_Telefoon_text_9dbd', true ); ?>
    						<?php } else { // if not bp detected..let go normal ?>
    							<?php wpmu_singleloop(); ?>
    													<?php echo get_post_meta( $post->ID, 'ct_Straatnaam_text_c7a7', true ); ?>
    													<?php echo get_post_meta( $post->ID, 'ct_Telefoon_text_9dbd', true ); ?>
    						<?php } ?>
    					<?php locate_template( array( '/library/components/pagination.php' ), true ); ?>
    			<?php else: ?>
    					<?php locate_template( array( '/library/components/messages.php' ), true ); ?>
    			<?php endif; ?>
    			</div>
    		<?php if($bp_existed == 'true') : ?>
    			<?php do_action( 'bp_after_blog_single_post' ) ?>
    				<?php endif; ?>
    		</div><!-- .padder -->
    	</div><!-- #content -->
    		<?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    			<?php get_sidebar('bpblog'); ?>
    		<?php } else { // if not bp detected..let go normal ?>
    				<?php get_sidebar('blog'); ?>
    		<?php } ?>
    <?php get_footer() ?>

    But the layout isn't changing, so i'm afraid I did it wrong or I'm using the wrong template file.
    Any advice for me?

  • Kimberly
    • Champion of Loops

    I think you should check the directory theme (located with the directory install) and use that page template instead.

    single_listing.php or single_post.php
    I'm not sure which, one of those two, but using the custom post type instead would be better

  • Kimberly
    • Champion of Loops

    Hi!

    Just checking in :slight_smile:

    I'm guessing that because we haven't heard back from you that you've got your issue worked out! If you are still having problems or need any other answers on this particular topic please feel free to come back to this thread at anytime. Just be sure to mark it Not Resolved so we don't miss it!

    Thanks for using the WPMU forums!

    Best,
    Kimberly

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.