Skip Navigation

[Resolved] can make thing work

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1165444

Hi just baught it i wa using acf for years and decides to start using toolset because of the wide possiablities
its a bit hard for me
1- i can make the views work im using ultimatum frame work, when acitvating the view plugin the content disapers
do i need to do smothing

bascially i think that when i will fix thati will progress ith learning toolset capbilities and adapt them to my use
tnx

#1165578

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

Would you mind providing me with admin access to the site as well as the page that goes blank when views is active?

Thanks,
Shane

#1165634

hi look im trying to figure out some stuff
right now what im stuck i have a repeator group which called
slides inside i have slidepic(image) and title
i want to display a gallery filed from the repeator
i read this https://toolset.com/forums/topic/get-id-of-repeater-image-field-insted-of-url/
but it doesnt work im trying to put this codein my functions

function prefix_get_img_ids($atts) {
global $post;

$images = (array) get_post_meta($post->ID, 'slides', false); // cast to array in case there is only one item
$ids = array();

global $wpdb;

foreach($images as $img) {
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$img'";
$id = $wpdb->get_var($query);
$ids[] = $id;
}

return implode(",",$ids);
}
add_shortcode("get-image-ids", "prefix_get_img_ids");

any clues what might be worng
thanks

#1165741

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eitan,

This is an old solution.

I would recommend this one below.
https://toolset.com/forums/topic/generate-slide-on-my-slider/

Thanks,
Shane

#1165772

not good i need to genrate gallery shortcode
pulling the images in repeator group field
[gallery ids="x,y,z"]
how can i do it

another questions

im using revolution slider wordpress gallery addon
i need to add media custom filed which will be in each repeator filed
and will be assigned to each picture attachment filed

can you guide me?

how can i make a multi step front end form?

is there a way to make a site whic user can select package kets say 1 ost 5 post and unimtied
each packege has a price after paying you can add umber of post dipending on your package?

can you guide me
tnx

#1165782

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eitan,

We only handle one issue per ticket. Right now this initial thread was about your site going blank after activating views.

Now for the custom code to work I would you need to change the "slides"

$images = (array) get_post_meta($post->ID, 'slides', false); // cast to array in case there is only one item

In the above shortcode you need to add the slug of your custom field that hold the images, using the wpcf- prefix. Example wpcf-my_slug

#1166173

hi doesnt do nothing
what is wrong
i dont know if i mentions that the filed are in custom post type "woosee-slide"
mybe somthing is need tom be changed in the code
tnx
<?php
/*
* Simple Child Theme generated by Ultimatum Framework
*/
function prefix_get_img_ids($atts) {
global $post;

$images = (array) get_post_meta($post->ID, 'wpcf-slides', false); // cast to array in case there is only one item
$ids = array();

global $wpdb;

foreach($images as $img) {
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$img'";
$id = $wpdb->get_var($query);
$ids[] = $id;
}

return implode(",",$ids);
}
add_shortcode("get-image-ids", "prefix_get_img_ids");

#1166192

can i send you login details
is this private area?
tnx

#1166321

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Yes please provide me with admin access.

Also please send the page where this code is to be used.

Thanks,
Shane

#1167834

Hi, Shane is out this week on holiday and I will be looking over his tickets.
[gallery ids="x,y,z"]
how can i do it

The code here is not written for Repeatable Field Groups, it is written for repeating fields. I can help you change it. If you want to produce a comma-separated list of IDs from a repeatable field group (RFG), you must use a View.
- Create a new View of this RFG. Choose "Full custom display" in the View popup.
- Add a Post Relationship Query Filter where the parent is set by the current post or page.
- Click "Loop Wizard" and choose "List with separators" and insert the custom image field shortcode.
- After the loop code is generated, add the output="raw" attribute to each image field shortcode.
- Check "Disable the wrapping div around the View" below the loop editor.
- Delete all the code between wpv-no-items-found tags.
- The loop will look like this:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
			[wpv-item index=other]
				[types field="your-image-field-slug" output="raw"][/types],
			[wpv-item index=last]
				[types field="your-image-field-slug" output="raw"][/types]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found][/wpv-no-items-found]
[wpv-layout-end]

- Add the following custom code to your child theme's functions.php file, or to a custom code snippet in Toolset > Settings > Custom code:

function wpt_get_img_gallery_from_urls($atts) {
  $a = shortcode_atts( array(
    'urls' => '',
  ), $atts );

  $images = explode(',', $a['urls']);
  $ids = array();

  global $wpdb;

  foreach($images as $img) {
  $query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$img'";
    $id = $wpdb->get_var($query);
    if($id)
      $ids[] = $id;
  }

  return do_shortcode('[gallery ids="' . implode(",",$ids) . '"]');
}
add_shortcode("get-image-gallery-from-urls", "wpt_get_img_gallery_from_urls");

- Now you can insert the new custom shortcode in your template for Wowsee single posts:

[get-image-gallery-from-urls urls="[wpv-view name='Your View of RFGs']"][/get-image-gallery-from-urls]
#1167849

sorry but i cant make it work
i dont see all the stuff you wrote like
query filter which has parent
please can you look maybe
here is a single page doesnt do nothing
hidden link
you habe my login details
thanks

#1167973
step-1.png
step-2.png
step-3.png

- Create a new View of this RFG. Choose "Full custom display" in the View popup.
Go to wp-admin, then Toolset > Views > Add New. In the popup, choose "Full custom display mode". See step-1.png. Then select your repeatable field group (RFG) in the Content Selection area in the View editor.

- Add a Post Relationship Query Filter where the parent is set by the current post or page.
If you cannot see the Query Filter panel, scroll to the top right corner and click "Screen Options". You can activate the Query Filter panel here. Then click "Add a Filter" and select "post relationship or repeatable field group owner". See step-2.png.

Then choose "The post where this View is shown" and choose your RFG in the select field. See step-3.png

Tell me if you are able to complete these steps.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.