Coding Panda
Forum Replies Created
-
Brilliant!
I am afraid that there are no interfaces to import data.
Yes, that is the folder. You can zip it up and upload it to your Dropbox and share the link with me, like how I share the screenshots. Anyone can access it but there is nothing sensitive and you can remove it later.
You are welcome.
OK, I imported your Pods and tested them. It works fine at my end. Please see the screenshots:
https://www.dropbox.com/s/3vrxxnoe826lbgg/Edit-Project-Panda-Pods-Repeater-Field-User-1-%E2%80%94-WordPress.png?dl=0
https://www.dropbox.com/s/8ebw9kozt861hz4/Website-%E2%80%93-Panda-Pods-Repeater-Field-%E2%80%93-User-1.png?dl=0Here is the code for single-project.php
<?php /** * The template for displaying projects * * * @package WordPress * @subpackage Twenty_Sixteen * @since Twenty Sixteen 1.0 */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php echo '<pre>'; print_r( pods_field('task')); echo '</pre>'; ?> </main><!-- .site-main --> <?php get_sidebar( 'content-bottom' ); ?> </div><!-- .content-area --> <?php get_sidebar(); ?> <?php get_footer(); ?>If this still doesn’t help, you may send over your theme folder and I can test it for you.
Would you please export your Pods and paste them here for me. If you just followed my tutorials, there should be nothing sensitive.
“To move your Pods to another website, go to Pods Admin > Components and enable the Migrate:Packages component. Follow the steps and you can export your settings, fields and Pods.” – Pods Framework.
🙂 No worries. Hope you find the plugin useful.
Is the plugin activated? It should appear in the Other section of the Field Type dropdown.
Try to disable and activate the plugin again.
Hi @info43
-_-! Sorry for the confusion. That text was copied from a plugin sample. There is no settings page. I will remove it.
Please follow these two videos to do the settings.
Best Regards
Forum: Plugins
In reply to: [Panda Pods Repeater Field] Filter by repeater fields valueHi @jaceejoef
Sorry for the delay.
From your description, you can use the following code on a single Service page to display all the locations for that service.
$service_locations = pods( 'service_location' ); $params = array( 'where' => 'service.id = ' . get_the_ID() ); $locations = $service_locations->find( $params ); if ( 0 < $locations->total() ) { while ( $locations->fetch() ) { echo $locations->display( 'name' ) . '<br/>'; } }Alternatively, you can merge Location CPT and Service Location ACT as Service Location ACT, and use it as the repeater field “location” in the Services CPT, then on the single Service page, use pods_field(‘location’) to fetch the locations.
Hope it makes sense.
Best Regards
Forum: Plugins
In reply to: [Panda Pods Repeater Field] Display fields on front-endThanks for using the plugin.
It requires a parent ID to display the repeater field. Is your code like this:
$pod = pods( 'work_order', 20 ); //20 is an ID. echo $pod->form( array( ), 'Save ' );By the way, for security reasons, only logged-in users and access a repeater field, and you need to give permission to user roles in Additional Field Options -> Access Allowed To User Roles.
Forum: Plugins
In reply to: [Panda Pods Repeater Field] Display Repeater FieldsHi @snookian, I have released a version with the fix. Please let me know if the problem still occurs.
Did you echo it out?
echo return_post_id();If you view the recipe page at the frontend, you should see a number on the top. If it is 0 or nothing, then the function is not returning the page id.
@austone Would you try to run this function return_post_id() in functions.php, open one of your recipe pages and see if it prints out the page ID?
Hi @austone
Thanks for exporting the Pods for me. This is not a problem with the plugin but I have found a solution for you. This is the background knowledge for the solution: https://docs.pods.io/displaying-pods/magic-tags/display-filters-with-magic-tags/
Here are the screenshots:
Input
https://www.dropbox.com/s/xp85v47btdqnkiz/Elementor%20recipe%282%29.png?dl=0We are going to use magic tags in the “where” field to display the cooking process only for the current recipe, ​so first, we need to know the post id. Unfortunately, we cannot simply use
get_the_ID()function as IDs are not available when functions.php is loaded, so we need to create a function to do it. This is the function I created. Hopefully, it also works for you.function return_post_id() { $url_parts = explode( '/', rtrim( $_SERVER['REQUEST_URI'], '/') ); $slug = $url_parts[ count( $url_parts ) - 1 ]; $page = get_page_by_path( $url_parts[ count( $url_parts ) - 1 ], OBJECT, 'recipe'); if( $page ){ return $page->ID; } return false; }Save the function into functions.php, and save this into the “Where” field:
pandarf_parent_post_id ={@post_id,return_post_id}.(If you use the step_in_cooking_process table as a repeater field somewhere else, you will need to add pandarf_parent_pod_id and pandarf_pod_field_id to the WHERE query.)
Please let me know if this solution solves your problem.
Forum: Plugins
In reply to: [Panda Pods Repeater Field] Display Repeater FieldsHi @snookian
You are a star! Yes, it is because of PHP 8. I will get that sorted.
Before I release a new version, you could go to panda-pods-repeater-field.php, line 731 and change
if( $atts_arr['limit'] != '' ){toif( ! empty( $atts_arr['limit'] ) ){That will fix the problem.
Hi @austone
I’m struggling to replicate what you are doing. would you please use Pods’ Migrate: Packages component to export the relevant pods for me so I can test it on my computer?
Thanks