• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Tags don't show content

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Tags don't show content

This topic is: not resolved

Tagged: tags foodiepro

  • This topic has 0 replies, 1 voice, and was last updated 7 years, 6 months ago by Sjoerd Smeets.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • January 3, 2018 at 12:12 am #215049
    Sjoerd Smeets
    Participant

    Hello, i'm using Foodie Pro 3.0 in combination with a Custom Post Type and a few custom fields made with ACF. The content from the CPT is showing like i want it, but when using one of the tags it doesn't show any content.

    Here's my archive-recept.php

    <?php
    // Template Name: Archief Recept
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'your_custom_loop' );
    
    function your_custom_loop() { ?>
    <article itemtype="http://schema.org/CreativeWork" itemscope="itemscope" class="post-<?php print $pageid; ?> page type-page status-publish entry">
    <div class="entry-content" itemprop="text">
    
    <?php 
    
    	$args = array(
    	 'post_type' => 'recept', // enter your custom post type
    	 'orderby' => 'menu_order',
    	 'order' => 'ASC',
    	 'posts_per_page'=> '12', // overrides posts per page in theme settings
    	 );
    	 $loop = new WP_Query( $args );
    	 
    	if(have_posts()) : while(have_posts()) : the_post();
    	echo '<h3><a href=' . get_permalink() . '>' . get_the_title() . '</a></h3>';
    	echo '<div class="one-fourth first">';
    
    	$aantalpersonen = get_field( 'aantal_personen' );
    	$voorbereidingstijd = get_field( 'voorbereidingstijd' ); 
    	$kooktijd = get_field( 'kooktijd' ); 
    	$totaaltijd = get_field( 'totaaltijd' );
    	//$ingredienten = get_field( 'ingredienten' ); 
    	//$instructies = get_field( 'instructies' ); 
    	//$variaties = get_field( 'variaties' );
    	
        echo '<h2>Details</h2>';
    	if (!empty($aantalpersonen)) {
    		echo '<strong>Aantal personen: </strong>'. $aantalpersonen .'<br />';
    	}
    	
    	if ( !empty( $voorbereidingstijd) ) {
    		echo '<strong>Voorbereiding: </strong>' . $voorbereidingstijd .'<br />';
    	}
    
    	if ( !empty( $kooktijd) ) {
    		echo '<strong>Koken: </strong>' . $kooktijd .'<br />';
    	}
    	if ( !empty( $totaaltijd) ) {
    		echo '<strong>Totaaltijd: </strong>' . $totaaltijd .'<br />';
    	}
    
    	if ( has_post_thumbnail($id) ) {
        echo '<div class="quote-obtuse"><div class="pic">'. get_the_post_thumbnail( $id, array(200,200) ).'</div></div>';
    	}
    	echo '</div>'; 
    	echo '<div class="three-fourths" style="border-bottom:1px solid #DDD;">';
    
    	the_content();
    	
    	 echo '</div>';
    
    endwhile; endif;	
    ?>
    </div></article>
    <?php }
    genesis();

    What am i missing?

    https://www.sniederke.nl
  • Author
    Posts
Viewing 1 post (of 1 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble