Support

Account

Forum Replies Created

  • Hi,

    I don’t know why my last Post is marked that this is the solution because it doesn’t work.

  • Hi,

    thanks for your answer. Isn’t it possible to display the posts of a category which I choose in AFC in the WP-Admin. Because I haven’t found a Tutorial here on the page how I can include this in the theme.

  • Hi,

    yes when I remove the code it would load perfect.

    I have tested it with the “twentythirteen” standard Theme and there the following code doesn’t work too.


    <?php $posts = get_field('myfieldname');
    if( $posts ): ?>
    <?php foreach( $posts as $p): ?>
    <?php echo get_the_title( $p->ID ); ?>
    <?php endforeach; ?>
    <?php endif; ?>

    I have also asked the Developer of the theme I normaly use but has also no idea what is going wrong there. But with the theme there is no error because with the standardtheme it also doesn’t work.

    Have you got any idea what can be done? Can I send you the website via private message that you can take a look what is going wrong there.

    Thank you for your help.

  • have nobody a Idea?

  • Hi,

    yes I have implementet this code


    <?php $posts = get_field('myfieldname');
    if( $posts ): ?>
    <?php foreach( $posts as $p): ?>
    <?php echo get_the_title( $p->ID ); ?>
    <?php endforeach; ?>
    <?php endif; ?>

    But I get the following Problem:

    The title would be displayed perfect.

    But the other 3 Postings in this category won’t be published. Only the first article will be showen in the category. All articles which will be listed after the relationship snipped won’t be showen.

  • Ok Thank you. Which Code I must use to display only the posts of the selected category from the taxonomy newskategoeie?

    Thank you for your help.

  • Hi,

    with this code I have the Problem which I descriped here.
    http://support.advancedcustomfields.com/forums/reply/reply-to-relationship-code-problem-4/

    Would it make sense when I send you via E-Mail an account for my website that you can see there the problem live?

    Thank you for your help.

  • Hi,

    ok I wan’t to descripe the problem.

    My Mainsetings for this field are the following. I Think you don’t need more setting information ore did you need some spezial infos?

    Feld-Typ: Artikel-Bezeihung
    Artikel-Beziehung: News Kategorien
    Feld-Typ: Auswahlmenü
    Nichts (NULL) erlauben? Nein
    Lade & Speichere Einträge im Artikel: Not marked
    Rückgabewert: Datei

    When I’m looking in the Frontend I won’t get displayed the Newsarticles of the category “News Kategorien”. There will be linked the hello world post and a attchment. But the hello world post is not in the “News Kategorien”. And I have delete them, it is only in the trash folder.

    When I put the debug code inside I get this response.

    
    stdClass Object
    (
        [term_id] => 7
        [name] => Category Name
        [slug] => category-name
        [term_group] => 0
        [term_taxonomy_id] => 8
        [taxonomy] => newskategoeie
        [description] => 
        [parent] => 0
        [count] => 1
    )
    

    There was at [name] an [slug] the right Name inside. But I won’t displays them here.

  • Hi,

    when I put this code inside I get this response. I have made some changes at the Content and Title because I won’t post this here.

    Have you any Idea what is wrong here?


    Array
    (
    [0] => WP_Post Object
    (
    [ID] => 61
    [post_author] => 2
    [post_date] => 2013-07-19 16:04:59
    [post_date_gmt] => 2013-07-19 14:04:59
    [post_content] => My Content I have writen
    [post_title] => My Title of the post
    [post_excerpt] =>
    [post_status] => publish
    [comment_status] => open
    [ping_status] => open
    [post_password] =>
    [post_name] => my-title-of-the-post
    [to_ping] =>
    [pinged] =>
    [post_modified] => 2013-07-19 16:05:21
    [post_modified_gmt] => 2013-07-19 14:05:21
    [post_content_filtered] =>
    [post_parent] => 0
    [guid] => http://www.domain.de/?post_type=hotel&p=61
    [menu_order] => 0
    [post_type] => hotel
    [post_mime_type] =>
    [comment_count] => 0
    [filter] => raw
    )

    )

  • Ok Thanks with link=”file” it works.

  • Hi,

    yes I take a look there. I allready testet it with this code.

    But it doesn’t work.


    <?php if(get_field('news-kategorie')) { ?>
    <h2>News</h2>

    <?php $posts = get_field('news-kategorie');

    if( $posts ): ?>
    <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
    <?php setup_postdata($post); ?>

    <div class="news-kategorie">
    <?php if ( has_post_thumbnail()) { ?>
    <div style="float:left;margin-right:5px;width:75px;high:75px;">
    <?php the_post_thumbnail('thumbnail'); ?>
    </div>
    <?php } ?>

    <h4 style="margin-top:30px;">"><?php the_title(); ?></h4>
    </div>

    <?php endforeach; ?>
    <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>

    <?php endif; ?>

    <?php } ?>

    And in the German Version there are different this which I can choose. One is “Beziehung” and the other which I use here is “Artikel-Beziehung”. But for the “Artikel-Beziehung” I haven’t found a several documentation.

  • Hi elliot,

    thanks for your answer. I testet it with this code. But it doesn’t work too.

    Regards,

    Andreas

  • Hi,

    sure I wan’t to explain it more detailed.

    I have got a category where now 4 articles should be listed. On every article I would like to display via the relationship the title of an other article which is connected via the relationship.

    For displaying the title I use this code snipped

    <?php $posts = get_field('myfieldname');
    if( $posts ): ?>
    <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
    <?php setup_postdata($post); ?>
    "><?php the_title(); ?>
    <?php endforeach; ?>
    <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
    <?php endif; ?>

    The title would be displayed perfect.

    But the other 3 Postings in this category won’t be published. Only the first article will be showen in the category. All articles which will be listed after the relationship snipped won’t be showen.

    Have you got any idea?

  • Hi,

    I’m useing this code.

    <?php $image_ids = get_field('bildergalerie', false, false); $shortcode = ' [gallery ids="' . implode(',', $image_ids) . '"] '; echo do_shortcode( $shortcode ); ?>

  • Hi, yes I have insert there allready my field name.

    But at the Post Listing for all Posts of the category the second post which would be loaded after this code won’t be published.

  • Sorry it was my misstake it works great.

Viewing 16 posts - 1 through 16 (of 16 total)