Support

Account

Forum Replies Created

  • Hi, mine was:

    <?php if( get_field('personal_website_or_blog_url') ): ?>
    <a href="http://<?php $site = get_field('personal_website_or_blog_url');
    $site = str_replace(array('http://', 'https://'), '', $site);
    $site = rtrim($site, '/');
    echo $site;?>" data-avia-related-tooltip="view website" target="_blank">
    <i class="fa fa-television" title="Personal Website" aria-hidden="true"></i></a>
    <?php endif; ?> 
    

    … obviously my field was ‘personal_website_or_blog_url’ so you would need to change that out for yours.

  • Hi John, I just wanted to say thanks for posting this, there are threads all over the place about this topic and no documentation in the acf form pages. If Acf has a front end form and can load content and title into it, adding a featured image should come as standard. I wasted an entire day looking for a solution to this, your simple solution solved my issue straight away.

  • thanks fabianmarz! I added your code:

    add_filter('acf/settings/google_api_key', function ($value) {
      return 'YOUR_API_KEY';
    });

    obviously replacing ‘YOUR_API_KEY’ with my google maps Api key and the maps are now showing!

  • Cracked it!!

    $output .= get_field('excerpt', $entry->ID);
    

    …was the code I was looking for!

    Wow! That was epic!

    Thanks for your support!

  • Sorry – I just noticed I was looking at a page with only 1 result on – on a page with several posts this has returned all the results but again, its threw it to the top of the screen, not where I have placed it in the code.

  • Hi James,

    the above code when put where I needed it to go added:

    === post id ===
    int(181)
    === repetaer with id ===
    
        Compact, Portable Explosion-Proof Light
    
        ATEX Zone 1, 2, 21, 22
    
        36W and 55W
    
        IP66/67
    
    

    above all content.
    🙂

  • hi, I am in talks with the theme author – trying different methods out, have a check of:

    http://www.kriesi.at/support/topic/how-to-get-the-id-of-the-post-when-you-use-the-avf_post_slider_entry_excerpt/#post-640822

    … see if there is anything there you can pickup?

  • <div id="main" data-scroll-offset="0">
    <pre>=== post id === int(135) === repetaer without id === === repetaer with id === </pre>
    <pre>=== post id === int(135) === repetaer without id === === repetaer with id === </pre>
    <pre>=== post id === int(135) === repetaer without id === === repetaer with id === </pre>
    <pre>=== post id === int(135) === repetaer without id === === repetaer with id === </pre>
    <div id="prodtitle"...etc 

    … was the html output

  • Hi James,
    that output:

    
    === post id ===
    int(135)
    === repetaer without id ===
    === repetaer with id ===
    

    4 times at the very top of the page above all the content but below the header.

  • This really helped me Daron, thanks for the post!

  • Hi James, thanks for getting back – I have had a chance to have a look at this but I am still getting the repetition.

    I may be getting myself confused here but I think the code I added before was already in the loop.

    Have a look at the attached screenshot for clarification:

    example

    You will see 3 posts returned through the theme code, each with a unique title/image/excerpt (in the grey box). You will then see underneath the field I am attempting to include from ACF which is a manual exerpt. Even though these are unique for each post, its just repeating the first post’s one.

    Thanks for looking into it!

    Dann

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