Forum Replies Created

Viewing 15 replies - 16 through 30 (of 82 total)
  • Thread Starter berttervoert

    (@berttervoert)

    After some further reading and trial and error, I managed to display the image from the related pod. I used the following lines of code:

    $wdtv_kaartje_array  = get_post_meta( $wdtv_id, 'routekaart', true );
    $wdtv_kaartje = $wdtv_kaartje_array["guid"];

    But I read somewhere that ‘guid’ may not the best solution for this. Is this true, and if so, what is the correct way to go about it?

    Now I’m struggling with another problem I haven’t been able to solve: I want the displayed title of the ‘fietsroute agenda’ pod to be a link to the related post, so it will go to the page that shows the details of the related ‘route’.

    Thanks in advance,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Thanks for your response. Bernhard, you are absolutely right that there is a free version of buddyforms, but the plugin that makes it work with pods is a paid plugin.

    I do understand that not everything can be for free. I just didn’t want to spend a whole lot of time searching for something that doesn’t exist and I figured you guys would know if there was a free solution. So thank you for your answers, I know what to try next now.

    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    so this question isn’t resolved as far as I’m concerned.

    Thread Starter berttervoert

    (@berttervoert)

    The buddyforms you suggest in your second link isn’t a free option ($ 79,99 per year). I had already looked at that but the price is too much for the project I’m working on.

    Thread Starter berttervoert

    (@berttervoert)

    I deleted the line for adding the gpx mime in my functions.php and added it in the admin page of your plugin, and now it works like a charm!

    The gpx files I use are files I also use on my Garmin bike computer, so they are real gpx files.

    Thank you for your suggestions and it’s great I got it working!
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Hi @kimipooh,

    I used your suggestion, but still no success. When I try to upload a gpx file, I can select one from the directory (previously gpx files weren’t even visible), but when I click ‘open file’, the progress bar runs for a bit and then displays the warning in the right-hand section of the screen. Below I added a link to a screenshot of the media library page.

    I had neither option enabled, tried enabling first the one and next the other, but no difference. Do I have to clear cache after making changes? I add the gpx mime type via my functions.php file, and any change there immediately shows in the list of allowed mime types
    and file extensions on the admin page.

    Do you have any suggestions to geet this working?

    The screenshot:
    https://www.dropbox.com/s/dmlj9djh9xag53s/Screenshot_2020-11-13%20Bewerk%20Fietsroute%20%E2%80%B9%20WTC%20de%20Door%28en%29trappers%20%E2%80%94%20WordPress.png?dl=0

    Thanks in advance,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Hi @jori,

    after searching around some more, I found the solution for the problem:

    instead of {@fotos._img.thumbnail} I use {_img.thumbnail}. Now all images are shown. Must have been to late yesterday, to long staring at it.

    Thanks,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    add:

    I’ve tried it with three images. Result: First div empty like before and then the first images is shown twice. So, looks like I made a mistake in the [each][/each] section.

    Thread Starter berttervoert

    (@berttervoert)

    Hi @jory,

    Thank you so much for your answers and patience! I finally got this working. My – working – template now looks like this:

    <?php
    /*
      Template Name:      wdtv upcoming programm
      Template Post Type: post, page, fietsroutes, agenda_fietsroutes
      Description:        Template om de komende fietsroutes van het programma
                          weer te geven op de homepages.
    */
    ?>
    <div class="wdtv_club_titel">Programma aankomende weken:</div>
    <?php
    //  Get the weeknumber for the current week and the next week
    $cur_week_nr = date('W');
    $nxt_week_nr = ($cur_week_nr + 1);
    
    //  Set up the parameters for pods::find
    $params = array(
      'where' => 'week.meta_value = "' . $cur_week_nr . '" OR week.meta_value = "' . $nxt_week_nr . '"',
      'orderby' => 'datum.meta_value',
      'limit' => -1
    );
    
    //  Run the find
    $wdtv_pods = pods( 'agenda_fietsroutes', $params );
    
    if ( $wdtv_pods->total() > 0 ) {
      while ( $wdtv_pods->fetch() ) {
        $route          = $wdtv_pods->display( 'route' );
        $datum          = $wdtv_pods->display( 'datum' );
        $tijd_vertrek   = $wdtv_pods->display( 'vertrektijd' );
        $plaats_vertrek = $wdtv_pods->display( 'vertrekplaats' );
        ?>
        <div id="wdtv_programma_container">
        <?php
        //  Get additional info from related pod
        $wdtv_related = $wdtv_pods->field( 'route' );
        if ( !empty ( $wdtv_related ) ) {
             $wdtv_id = $wdtv_related[ 'ID' ];
             $wdtv_distance = get_post_meta( $wdtv_id, 'afstand', true );
        }
        else {
          echo " geen relaties gevonden";
        }
        ?>
    
            <div id="wdtv_programma_item">
              Op <?php echo $datum; ?> rijden we de <?php echo '<a href="' . esc_url( get_permalink( $wdtv_id ) ) . '">' . $route . '</a>'; ?><br>
              Lengte: <?php echo $wdtv_distance; ?> km.
            </div>
          </div><?php
      }
    }
    else {
      ?>er staan geen activiteiten gepland voor de komende weken.<?php
    }
    ?>
    

    As you can see, I even got some extra info from the related pod (distance).
    I learned a lot from this and there is still a lot to learn! I’m gonna give pods a 5 star rating on wordpress. Is there a place where you can share your code for others with similar problems?

    Thanks again,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Hi @jory,

    I changed that line of code. I’m trying to get things working using the pods tutorial “get values from a relationship field”, but when I use the line: $wdtv_related = $wdtv_pod->field( 'title' ); I get a Fatal error: Uncaught Error: Call to a member function field() on int in C:\xampp\htdocs\door(en)trappers\wp-content\themes\hestia-child\wdtv\templateparts\wdtv_upcoming_programm.php:38 Stack trace: #0 C:\xampp\htdocs\door(en)trappers\wp-includes\template.php(732): require() #1 C:\xampp\htdocs\door(en)trappers\wp-includes\template.php(676): load_template('C:\\xampp\\htdocs...', false, Array) #2 C:\xampp\htdocs\door(en)trappers\wp-includes\general-template.php(204): locate_template(Array, true, false, Array) #3 C:\xampp\htdocs\door(en)trappers\wp-content\themes\hestia-child\wdtv_shortcodes.php(15): get_template_part('/wdtv/templatep...') #4 C:\xampp\htdocs\door(en)trappers\wp-includes\shortcodes.php(343): wdtv_programm_upcoming('', '', 'wdtv_programm_u...') #5 [internal function]: do_shortcode_tag(Array) #6 C:\xampp\htdocs\door(en)trappers\wp-includes\shortcodes.php(218): preg_replace_callback('/\\[(\\[?)(wdtv_p...', 'do_shortcode_ta...', '\n<div class="wp...') #7 C:\xampp\htdocs\door(en)trappers\wp-includes\class-wp-hook. in C:\xampp\htdocs\door(en)trappers\wp-content\themes\hestia-child\wdtv\templateparts\wdtv_upcoming_programm.php on line 38

    My code so far is:

    <div class="wdtv_club_titel">Programma aankomende weken:</div>
    <?php
    //  Get the weeknumber for the current week and the next week
    $cur_week_nr = date('W');
    $nxt_week_nr = ($cur_week_nr + 1);
    
    //  Set up the parameters for pods::find
    $params = array(
      'where' => 'week.meta_value = "' . $cur_week_nr . '" OR week.meta_value = "' . $nxt_week_nr . '"',
      'orderby' => 'datum.meta_value',
      'limit' => -1
    );
    
    //  Run the find
    $wdtv_pods = pods( 'agenda_fietsroutes', $params );
    
    if ( $wdtv_pods->total() > 0 ) {
      while ( $wdtv_pods->fetch() ) {
        $wdtv_pod       = $wdtv_pods->id();
        $route          = $wdtv_pods->display( 'route' );
        $datum          = $wdtv_pods->display( 'datum' );
        $tijd_vertrek   = $wdtv_pods->display( 'vertrektijd' );
        $plaats_vertrek = $wdtv_pods->display( 'vertrekplaats' );
        ?>
        <div id="wdtv_programma_container">
        <?php
        //  Get additional info from related pod
        //$wdtv_pod       = pods( 'agenda_fietsroutes', get_the_id() );
        echo $wdtv_pod;
        $wdtv_related = $wdtv_pod->field( 'fietsroute.title' );
        if ( !empty ( $wdtv_related ) ) {
        //  foreach ( $wdtv_related as $wdtv_rel ) {
        //    $wdtv_id = $wdtv_rel[ 'ID' ];
        //  }
        }
        else {
          echo " geen relaties gevonden";
        }
        ?>
    
            <div id="wdtv_programma_item">
              Op <?php echo $datum; ?> rijden we de <?php echo '<a href="' . esc_url( get_permalink( $id ) ) . '">' . $route . '</a>'; ?>
            </div>
          </div><?php
      }
    }
    else {
      ?>er staan geen activiteiten gepland voor de komende weken.<?php
    }
    ?>
    

    Line 38 is the line that starts with $wdtv_related =
    I’ve tried some of the available options as mentioned on the field() documentation page, but it keeps throwing that error. I did a copy and paste of that line of code to be sure there wasn’t a typo in it, but no change of result.

    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Hi @jory,

    After some more trial and error, I managed to get the id of the post(s) using the following line of code after

    if ( $wdtv_pods->total() > 0 ) {
      while ( $wdtv_pods->fetch() ) { 

    $wdtv_pod_id = $wdtv_pods->display( 'id');

    I’m still in the loop that gets the info from the agenda_fietsroutes pod. Might this be a problem? Is it possisble to nest a pods-loop within a pods-loop (an nested loop)?

    I hope to get a reaction from you. Meanwhile I’ll keep trying to get this to work.
    Thank you so far,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Hello @jory,

    ad 2) that is a typo indeed. Changed it to agenda_fietsroutes, which is the correct name for the pod.

    the part of the code that doesn’t seem to work is now:

        //  Get additional info from related pod
        $wdtv_pod       = pods( 'agenda_fietsroutes', get_the_id() );
        echo $wdtv_pod;
        $wdtv_releated  = $wdtv_pod->field( 'relationship_field' );
        if ( !empty ( $wdtv_related ) ) {
          foreach ( $wdtv_related as $wdtv_rel ) {
            $wdtv_id = $wdtv_rel[ 'ID' ];
          }
        }
        else {
          echo " geen relaties gevonden";
        }
        ?>
    

    The line: echo $wdtv_pod; shows on the page: post_type: agenda_fietsroutes. And the line in the ‘else’ statement gets displayed.
    Somewhere in the forumposts I came across the suggestion to add ?pods_debug_sql=1 to the page url. This throws out the following:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function PodsData::get_sql(), 0 passed in C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\PodsData.php on line 718 and exactly 1 expected in C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\PodsData.php:3528 Stack trace: #0 C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\PodsData.php(718): PodsData->get_sql() #1 C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\Pods.php(2715): PodsData->select(Object(stdClass)) #2 C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\Pods.php(389): Pods->find(Object(stdClass)) #3 C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\includes\classes.php(22): Pods->__construct('agenda_fietsrou...', Array) #4 C:\xampp\htdocs\door(en)trappers\wp-content\themes\hestia-child\wdtv\templateparts\wdtv_upcoming_programm.php(22): pods('agenda_fietsrou...', Array) #5 C:\xampp\htdocs\door(en)trappers\wp-includes\template.php(732): require('C:\\xampp\\htdocs...' in C:\xampp\htdocs\door(en)trappers\wp-content\plugins\pods\classes\PodsData.php on line 3528
    

    Hope this makes any sense to you. But I think it is a problem that the line $wdtv_pod = pods( 'agenda_fietsroutes', get_the_id() ); doesn’t seem to return the id. And is this the cause for the fatal error?

    Hope to hear from you,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    The code I use in my template:

    <?php
    /*
      Template Name:      wdtv upcoming programm
      Template Post Type: post, page, fietsroutes, agenda_fietsroutes
      Description:        Template om de komende fietsroutes van het programma
                          weer te geven op de homepages.
    */
    ?>
    <div class="wdtv_club_titel">Programma aankomende weken:</div>
    <?php
    //  Get the weeknumber for the current week and the next week
    $cur_week_nr = date('W');
    $nxt_week_nr = ($cur_week_nr + 1);
    
    //  Set up the parameters for pods::find
    $params = array(
      'where' => 'week.meta_value = "' . $cur_week_nr . '" OR week.meta_value = "' . $nxt_week_nr . '"',
      'limit' => -1
    );
    
    //  Run the find
    $wdtv_pods = pods( 'agenda_fietsroutes', $params );
    
    if ( $wdtv_pods->total() > 0 ) {
      while ( $wdtv_pods->fetch() ) {
        $route          = $wdtv_pods->display( 'titel' );
        $datum          = $wdtv_pods->display( 'datum' );
        $tijd_vertrek   = $wdtv_pods->display( 'vertrektijd' );
        $plaats_vertrek = $wdtv_pods->display( 'vertrekplaats' );
    
        $wdtv_pod       = pods( 'agenda_fietsroute', get_the_id() );
        $wdtv_releated  = $wdtv_pod->field( 'relationship_field' );
        if ( !empty ( $wdtv_related ) ) {
          foreach ( $wdtv_related as $wdtv_rel ) {
            $wdtv_id = $wdtv_rel[ 'ID' ];
          }
        }
    
        ?>
          <div id="wdtv_programma_container">
            <div id="wdtv_programma_item">
              Op <?php echo $datum; ?> rijden we de <?php echo '<a href="' . esc_url( get_permalink( $id ) ) . '">' . $route . '</a>'; ?>
            </div>
          </div><?php
      }
    }
    else {
      ?>er staan geen activiteiten gepland voor de komende weken.<?php
    }
    ?>
    

    I also exported the two pods:

    {“meta”:{“version”:”2.7.23″,”build”:1604347348},”pods”:{“68”:{“id”:68,”name”:”agenda_fietsroutes”,”label”:”Agenda Fietsroutes”,”description”:””,”type”:”post_type”,”storage”:”meta”,”object”:””,”alias”:””,”fields”:{“titel”:{“id”:75,”name”:”titel”,”label”:”Titel”,”description”:”Selecteer de route”,”help”:””,”class”:””,”type”:”pick”,”weight”:0,”pick_object”:”post_type”,”pick_val”:”fietsroute”,”sister_id”:””,”required”:”0″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_format_type”:”single”,”pick_format_single”:”dropdown”,”pick_format_multi”:”checkbox”,”pick_display_format_multi”:”default”,”pick_display_format_separator”:”, “,”pick_allow_add_new”:”1″,”pick_taggable”:”0″,”pick_show_icon”:”1″,”pick_show_edit_link”:”1″,”pick_show_view_link”:”1″,”pick_limit”:”0″,”pick_user_role”:[],”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”pick_select_text”:””,”pick_table_id”:””,”pick_table_index”:””,”pick_display”:””,”pick_where”:””,”pick_orderby”:””,”pick_groupby”:””},”datum”:{“id”:69,”name”:”datum”,”label”:”Datum”,”description”:”De datum dat de route gereden wordt”,”help”:””,”class”:””,”type”:”date”,”weight”:1,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”date_type”:”wp”,”date_format”:”dmy_dash”,”date_allow_empty”:”1″,”date_html5″:”0″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”date_repeatable”:”0″,”date_format_custom”:””,”date_format_custom_js”:””,”date_year_range_custom”:””},”week”:{“id”:70,”name”:”week”,”label”:”Week”,”description”:”De week dat de route vereden wordt”,”help”:””,”class”:””,”type”:”number”,”weight”:2,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”number_format_type”:”number”,”number_format”:”i18n”,”number_decimals”:”0″,”number_format_soft”:”0″,”number_step”:”1″,”number_min”:”0″,”number_max”:”100″,”number_max_length”:”12″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”number_repeatable”:”0″,”number_placeholder”:””},”vertrektijd”:{“id”:71,”name”:”vertrektijd”,”label”:”Tijd vertrek”,”description”:”De tijd van vertrek”,”help”:””,”class”:””,”type”:”time”,”weight”:3,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”time_type”:”12″,”time_format”:”h_mma”,”time_format_24″:”hh_mm”,”time_allow_empty”:”1″,”time_html5″:”0″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”default_value”:”9:00″,”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”time_repeatable”:”0″,”time_format_custom”:””,”time_format_custom_js”:””},”vertrekplaats”:{“id”:72,”name”:”vertrekplaats”,”label”:”Plaats van vertrek”,”description”:”De plaats vanwaar we vertrekken”,”help”:””,”class”:””,”type”:”text”,”weight”:4,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”text_allow_shortcode”:”0″,”text_allow_html”:”0″,”text_allowed_html_tags”:”strong em a ul ol li b i”,”text_max_length”:”255″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”default_value”:”De Vos en de Craen”,”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”text_repeatable”:”0″,”text_placeholder”:””}},”show_in_menu”:”1″,”label_singular”:”Agenda Fietsroutes”,”public”:”1″,”show_ui”:”1″,”supports_title”:”0″,”supports_editor”:”0″,”publicly_queryable”:”1″,”exclude_from_search”:”0″,”capability_type”:”post”,”capability_type_custom”:”agenda_fietsroutes”,”capability_type_extra”:”1″,”has_archive”:”0″,”hierarchical”:”0″,”rewrite”:”1″,”rewrite_with_front”:”1″,”rewrite_feeds”:”0″,”rewrite_pages”:”1″,”query_var”:”1″,”can_export”:”1″,”default_status”:”draft”,”supports_author”:”0″,”supports_thumbnail”:”0″,”supports_excerpt”:”0″,”supports_trackbacks”:”0″,”supports_custom_fields”:”0″,”supports_comments”:”0″,”supports_revisions”:”0″,”supports_page_attributes”:”0″,”supports_post_formats”:”0″,”built_in_taxonomies_category”:”0″,”built_in_taxonomies_link_category”:”0″,”built_in_taxonomies_post_tag”:”0″,”menu_position”:”0″,”menu_icon”:”dashicons-calendar”,”show_in_nav_menus”:”1″,”show_in_admin_bar”:”1″,”pfat_enable”:”0″,”pfat_run_outside_loop”:”0″,”pfat_append_single”:”append”,”pfat_filter_single”:”the_content”,”pfat_append_archive”:”append”,”pfat_filter_archive”:”custom”,”rest_enable”:”0″,”read_all”:”0″,”write_all”:”0″,”pfat_filter_archive_custom”:”the_content”},”58″:{“id”:58,”name”:”fietsroute”,”label”:”Fietsroutes”,”description”:””,”type”:”post_type”,”storage”:”meta”,”object”:””,”alias”:””,”fields”:{“omschrijving”:{“id”:59,”name”:”omschrijving”,”label”:”Omschrijving”,”description”:”Geef een korte omschrijving van de route”,”help”:””,”class”:””,”type”:”paragraph”,”weight”:0,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”paragraph_allow_html”:”1″,”paragraph_oembed”:”0″,”paragraph_wptexturize”:”1″,”paragraph_convert_chars”:”1″,”paragraph_wpautop”:”1″,”paragraph_allow_shortcode”:”0″,”paragraph_allowed_html_tags”:”strong em a ul ol li b i”,”paragraph_max_length”:”0″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”paragraph_repeatable”:”0″,”paragraph_placeholder”:””},”routekaart”:{“id”:60,”name”:”routekaart”,”label”:”Kaart van de route”,”description”:”Upload een kaart van de route”,”help”:””,”class”:””,”type”:”file”,”weight”:1,”pick_object”:”custom-simple”,”pick_val”:””,”sister_id”:””,”required”:”0″,”file_format_type”:”single”,”file_uploader”:”attachment”,”file_attachment_tab”:”upload”,”file_edit_title”:”1″,”file_show_edit_link”:”0″,”file_linked”:”0″,”file_limit”:”0″,”file_restrict_filesize”:”10MB”,”file_type”:”images”,”file_field_template”:”rows”,”file_add_button”:”Bestand Toevoegen”,”file_modal_title”:”Voeg een bestand toe”,”file_modal_add_button”:”Bestand Toevoegen”,”file_wp_gallery_output”:”0″,”file_wp_gallery_link”:”post”,”file_wp_gallery_columns”:”1″,”file_wp_gallery_random_sort”:”0″,”file_wp_gallery_size”:”thumbnail”,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”file_allowed_extensions”:””},”afstand”:{“id”:61,”name”:”afstand”,”label”:”Afstand”,”description”:”Geef hier de (globale) afstand van de route in”,”help”:””,”class”:””,”type”:”number”,”weight”:2,”pick_object”:””,”pick_val”:””,”sister_id”:””,”required”:”0″,”number_format_type”:”number”,”number_format”:”i18n”,”number_decimals”:”0″,”number_format_soft”:”0″,”number_step”:”1″,”number_min”:”0″,”number_max”:”100″,”number_max_length”:”12″,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”number_repeatable”:”0″,”number_placeholder”:””},”fotos”:{“id”:62,”name”:”fotos”,”label”:”Foto’s”,”description”:”Upload foto’s van de route”,”help”:””,”class”:””,”type”:”file”,”weight”:3,”pick_object”:”custom-simple”,”pick_val”:””,”sister_id”:””,”required”:”0″,”file_format_type”:”multi”,”file_uploader”:”attachment”,”file_attachment_tab”:”upload”,”file_edit_title”:”1″,”file_show_edit_link”:”0″,”file_linked”:”0″,”file_limit”:”6″,”file_restrict_filesize”:”10MB”,”file_type”:”images”,”file_field_template”:”rows”,”file_add_button”:”Bestand Toevoegen”,”file_modal_title”:”Voeg een bestand toe”,”file_modal_add_button”:”Bestand Toevoegen”,”file_wp_gallery_output”:”0″,”file_wp_gallery_link”:”post”,”file_wp_gallery_columns”:”1″,”file_wp_gallery_random_sort”:”0″,”file_wp_gallery_size”:”thumbnail”,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”file_allowed_extensions”:””},”gpx_bestand”:{“id”:63,”name”:”gpx_bestand”,”label”:”GPX
    bestand”,”description”:”Upload GPX bestand van de route”,”help”:””,”class”:””,”type”:”file”,”weight”:4,”pick_object”:”custom-simple”,”pick_val”:””,”sister_id”:””,”required”:”0″,”file_format_type”:”single”,”file_uploader”:”attachment”,”file_attachment_tab”:”upload”,”file_edit_title”:”1″,”file_show_edit_link”:”0″,”file_linked”:”0″,”file_limit”:”0″,”file_restrict_filesize”:”10MB”,”file_type”:”images”,”file_field_template”:”rows”,”file_add_button”:”Bestand Toevoegen”,”file_modal_title”:”Voeg een bestand toe”,”file_modal_add_button”:”Bestand Toevoegen”,”file_wp_gallery_output”:”0″,”file_wp_gallery_link”:”post”,”file_wp_gallery_columns”:”1″,”file_wp_gallery_random_sort”:”0″,”file_wp_gallery_size”:”thumbnail”,”oembed_enabled_providers_facebookcom”:”0″,”oembed_enabled_providers_hulucom”:”0″,”oembed_enabled_providers_instagramcom”:”0″,”pick_post_status”:[“publish”],”admin_only”:”0″,”restrict_role”:”0″,”restrict_capability”:”0″,”hidden”:”0″,”read_only”:”0″,”roles_allowed”:[“administrator”],”rest_read”:”0″,”rest_write”:”0″,”rest_pick_response”:”array”,”rest_pick_depth”:”2″,”unique”:”0″,”file_allowed_extensions”:””}},”show_in_menu”:”1″,”label_singular”:”Fietsroute”,”public”:”1″,”show_ui”:”1″,”supports_title”:”1″,”supports_editor”:”0″,”publicly_queryable”:”1″,”exclude_from_search”:”0″,”capability_type”:”post”,”capability_type_custom”:”fietsroute”,”capability_type_extra”:”1″,”has_archive”:”0″,”hierarchical”:”0″,”rewrite”:”1″,”rewrite_with_front”:”1″,”rewrite_feeds”:”0″,”rewrite_pages”:”1″,”query_var”:”1″,”can_export”:”1″,”default_status”:”draft”,”supports_author”:”0″,”supports_thumbnail”:”0″,”supports_excerpt”:”0″,”supports_trackbacks”:”0″,”supports_custom_fields”:”0″,”supports_comments”:”0″,”supports_revisions”:”0″,”supports_page_attributes”:”0″,”supports_post_formats”:”0″,”built_in_taxonomies_category”:”0″,”built_in_taxonomies_event_cat”:”0″,”built_in_taxonomies_event_listing_category”:”0″,”built_in_taxonomies_link_category”:”0″,”built_in_taxonomies_post_tag”:”0″,”menu_position”:”0″,”menu_icon”:”dashicons-location-alt”,”show_in_nav_menus”:”1″,”show_in_admin_bar”:”1″,”pfat_enable”:”0″,”pfat_run_outside_loop”:”0″,”pfat_append_single”:”append”,”pfat_filter_single”:”the_content”,”pfat_append_archive”:”append”,”pfat_filter_archive”:”the_content”,”rest_enable”:”0″,”read_all”:”0″,”write_all”:”0″}}}

    I’ve got 3 questions/remarks about the code in the template:
    1) should get_the_id() return a number? When I echoed it, it show the post-type, not a number.
    2) The variable $wdtv_related is empty, so the foreach part doesn’t get executed.
    3) the last part of the template (the divs) isn’t correct at the moment, it needs to be altered, but that’s the result of many tries to get the php part working.

    Hope you have enough information to give any suggestions.
    Thanks in advance,
    Bert.

    Thread Starter berttervoert

    (@berttervoert)

    Last update:

    I created a custom shortcode which calls a template-part that outputs the bestuursleden the way I wanted. Here a screenshot of the result so far (not yet styled it completely):

    https://www.dropbox.com/s/wq0a8bv9kwxu2cc/Screenshot_De%20Club.png?dl=0

    berttervoert

    (@berttervoert)

    I think you should use limit instead of posts_per_page.

Viewing 15 replies - 16 through 30 (of 82 total)