alisonC
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Views queries calling admin-ajax are taking 2-4 seconds
1
2
Started by: alisonC
in: Toolset Professional Support
Problem: There are calls to admin-ajax.php when I use Toolset Views Slider. Solution: The reason you see the admin-ajax loads are that you selected the advanced option to pre-load other pages in Toolset. Please check the attached screenshot. If you deactivate that option those calls will not happen. The option in question is created to mitigate the issue when the next arrow is clicked. The amount of data is no problem an dit is more of a WordPress thing to get the response and it will take time for sure. Now, with the option disabled, the initial load will be faster as Toolset will not add an ajax call for the other two items in the slider. So it will be faster in the initial load. But when the arrow is clicked, for sure it will take time for the next one to be loaded. If the option is enabled, the initial load will be more as it will try to load the next item too. But then clicking the arrow will be fast. It will be your choice what to do with the option depending your need and which one (initial load, or fast arrow) is a priority for you. |
2 | 23 | 1 year, 7 months ago | ||
Can't limit dates in jQuery UI Datepicker in front-end Toolset Form
Started by: alisonC in: Toolset Professional Support |
3 | 13 | 1 year, 11 months ago | ||
I can't create post relationships.
Started by: alisonC in: Toolset Professional Support |
2 | 5 | 3 years, 8 months ago | ||
Links to next and previous sibling posts in a one-to-many post relationship
Started by: alisonC
in: Toolset Professional Support
Problem: I have a one-to-many post relationship between two custom post types. In the template for the child post type, I would like to display "Next" and "Previous" links to paginate between the sibling posts. Solution: Use a custom shortcode like this example that implements the post relationships API to create pagination links: // https://toolset.com/forums/topic/next-and-previous-sibling-posts-in-a-one-to-many-post-relationship/ // get a link to the next or previous sibling post in child post content template // example: [tssupp-next-prev-child current="[wpv-post-id]" step="1" relslug="book-chapter"][/tssupp-next-prev-child] // current: current post id, step: 1 for next or -1 for previous, relslug: slug of the post relationship function tssupp_next_prev_child($atts) { $a = shortcode_atts( array( 'current' => 0, 'step' => '1', 'relslug' => '', ), $atts ); $link = ''; // get all child posts $relationship_slug = $a['relslug']; $current_child_id = $a['current']; $parent_id = toolset_get_related_post( $current_child_id, $relationship_slug ); $sibling_args = array( 'query_by_role'=>'parent', 'limit'=>1000, 'role_to_return'=>'child', 'orderby'=>'title' ); $siblings = toolset_get_related_posts( $parent_id, $relationship_slug, $sibling_args ); // loop over child posts and get index of the current post foreach($siblings as $i=>$sibling) { if( $sibling == $current_child_id ) { break; } } // increment or decrement index for next or previous sibling $i += $a['step']; // create link to next/previous sibling if(isset($siblings[$i])){ $perm = get_the_permalink( $siblings[$i] ); $title = get_the_title( $siblings[$i] ); $link .= $a['step']=='1' ? "Next: " : "Previous: "; $link .= "<a href='" . $perm . "'>" . $title . "</a>"; } // output the link, or empty string if not set return $link; } add_shortcode( 'tssupp-next-prev-child', 'tssupp_next_prev_child' ); You'll use the shortcode like this to generate a "Next" link (if necessary): [tssupp-next-prev-child step="1" relslug="book-chapter" current="[wpv-post-id]"][/tssupp-next-prev-child] Replace book-chapter with the slug of the post relationship. You'll change the step value to -1 to generate a "Previous" link (if necessary): [tssupp-next-prev-child step="-1" relslug="book-chapter" current="[wpv-post-id]"][/tssupp-next-prev-child] Again, replace book-chapter with the slug of the post relationship. If you want to modify the links, you should only need to edit this part of the code: // create link to next/previous sibling if(isset($siblings[$i])){ $perm = get_the_permalink( $siblings[$i] ); $title = get_the_title( $siblings[$i] ); $link .= $a['step']=='1' ? "Next: " : "Previous: "; $link .= "<a href='" . $perm . "'>" . $title . "</a>"; } Relevant Documentation: |
2 | 5 | 3 years, 9 months ago | ||
Uncaught TypeError associated with Toolset shortcodes in admin
Started by: alisonC
in: Toolset Professional Support
Problem: A JavaScript error in wp-admin is breaking the "Text" tab of an editor panel. Solution: Update Smush Pro to the latest version to resolve this issue. |
2 | 9 | 4 years, 8 months ago | ||
Taxonomy slider doesn't display content when clicking next/previous controls
Started by: alisonC in: Toolset Professional Support |
2 | 3 | 5 years, 4 months ago | ||
Relationship select box in cred form won't show private posts.
Started by: alisonC in: Toolset Professional Support |
3 | 6 | 5 years, 11 months ago | ||
Custom filters are working very slowly
Started by: alisonC
in: Toolset Professional Support
Problem: The issue here is that the user's search filters were running slowly. Solution: In this case it was he user's server. The server was running slowly so it caused our views plugin filters perform slowly. Once the user upgraded the server resources then the view filters were working normally again. |
3 | 9 | 6 years, 7 months ago | ||
WooCommerce "Featured" field is not available in Views list of custom fields.
Started by: alisonC in: Toolset Professional Support |
2 | 5 | 7 years, 2 months ago |