Skip Navigation

[Resolved] What is the difference between content template, loop item, and template

This support ticket is created 5 years, 1 month 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 5 years, 1 month ago.

Assisted by: Jamal.

Author
Posts
#1615521

Anonymous

Hi Jamal;
yes, we can split the requests of course.
Here are the debug information :

{"core":{"Wordpress":{"Multisite":"Yes","SiteURL":"<em><u>hidden link</u></em>","HomeURL":"<em><u>hidden link</u></em>","Version":"5.4.1","PermalinkStructure":"/blog/%postname%","PostTypes":"post, page, attachment, revision, nav_menu_item, custom_css, customize_changeset, oembed_cache, user_request, wp_block, project, wp-types-group, wp-types-user-group, wp-types-term-group, view, view-template, parkings, wpa-helper, et_theme_builder, et_template, et_header_layout, et_body_layout, et_footer_layout","PostSatus":"publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, hidden"},"Server":{"jQueryVersion":"1.12.4-wp","PHPVersion":"7.3.5","MySQLVersion":"5.7.28","ServerSoftware":"nginx/1.16.0"},"PHP":{"MemoryLimit":"256M","UploadMax":"300M","PostMax":"1000M","TimeLimit":"1200","MaxInputVars":"4000"}},"plugins":{"active_plugins":{"wordpress-importer/wordpress-importer.php":{"Name":"WordPress Importer","PluginURI":"https://wordpress.org/plugins/wordpress-importer/","Version":"0.7","Author":"wordpressdotorg","AuthorURI":"https://wordpress.org/","TextDomain":"wordpress-importer","DomainPath":"","Network":false,"RequiresWP":"","RequiresPHP":"","Title":"WordPress Importer","AuthorName":"wordpressdotorg"}},"mu_plugins":{"local-by-flywheel-live-link-helper.php":{"Name":"Local by Flywheel Live Link Helper","PluginURI":"<em><u>hidden link</u></em>","Version":"1.1","Description":"Makes WordPress URL functions relative to play nicely with Live Links.","Author":"Flywheel","AuthorURI":"<em><u>hidden link</u></em>","TextDomain":"","DomainPath":"","Network":false,"RequiresWP":"","RequiresPHP":"","Title":"Local by Flywheel Live Link Helper","AuthorName":"Flywheel"}},"dropins":[]},"theme":{"Name":"Divi","ThemeURI":null,"Author":"u003Ca href=<em><u>hidden link</u></em> Themesu003C/au003E","AuthorURI":null,"Template":"Divi","Version":"4.4.5","TextDomain":null,"DomainPath":null},"extra-debug":{"types":{"add_resized_images_to_library":0,"register_translations_on_import":1,"images_remote":0,"images_remote_cache_time":"36","help_box":"by_types","hide_standard_custom_fields_metabox":"show","postmeta_unfiltered_html":"on","usermeta_unfiltered_html":"on"},"views":{"views_template_loop_blog":0,"wpv_bootstrap_version":1,"wpv_custom_conditional_functions":[],"wpv_custom_inner_shortcodes":[],"wpv_debug_mode":"","wpv_debug_mode_type":"compact","wpv_map_plugin":0,"wpv_show_hidden_fields":"","wpv_saved_auto_detected_framework":"","wpv_codemirror_autoresize":"","wpv_enable_pagination_manage_history":true,"wpv_enable_parametric_search_manage_history":true,"support_spaces_in_meta_filters":0,"allow_views_wp_widgets_in_elementor":0,"default_user_editor":"basic","default_wpa_editor":"basic","manage_meta_transient_method":"cron","editing_experience":"classic","view_cpt_parkings":235723,"views_template_for_parkings":235820},"installer":{"version":"2.2.4","repositories":{"wpml":{"api-url":"<em><u>hidden link</u></em>","bucket-url":"not assigned","subscription":""},"toolset":{"api-url":"<em><u>hidden link</u></em>","bucket-url":"<em><u>hidden link</u></em>","subscription":{"key":"UGzBeb18rr","data":{"subscription_type":7527,"expires":"2021-02-05","status":"1","notes":"prolonged from #87127"},"registered_by":1,"site_url":"<em><u>hidden link</u></em>"}}},"instances":{"/Users/admin/Local Sites/parkagence2020/app/public/wp-content/plugins/types/vendor/otgs/installer/installer.php":{"bootfile":"/Users/admin/Local Sites/parkagence2020/app/public/wp-content/plugins/types/vendor/otgs/installer/installer.php","version":"2.2.4","args":{"plugins_install_tab":"1","repositories_include":["toolset","wpml"]},"delegated":true}}}}}

Then I have another question : what is the difference between content template for Parkings, loop item for parking and Template for Parkings? I really don't get the difference...
Thanks very much
Julie

#1615549

Hello Julie.

Loop is a WordPress concept, and it is in the core of WordPress. Think of it as a process that will iterate through a list of items and display each one of them at a time. I believe other resources will help you understand it better:
- hidden link
- https://developer.wordpress.org/themes/basics/the-loop/

In Toolset, we have several elements for displaying content: Content templates, Views, and Archives. You can read more about Toolset glossary here: https://toolset.com/glossary/
- Views are meant to display a list of items(pages, posts, parkings, etc.). Views use the concept of the loop. The view query a list of items from the database based on filters, then display them within the loop. If you add a title inside the loop of a view, it will display the title for each item returned by its query.
- Content Templates are meant to display a single item(post/page/parking/etc.). A content template can be assigned or unassigned. ONLY ONE content template can be assigned for a custom post type and will be used to display the post single page(for example: /product/magic-kube for a "Magic Kube" product).

Unassigned content templates are used within other content templates or views. Views can also be used within content template. Views can be nested inside other views. And so on.

When you create a view, the wizard of the view loop can create automatically a content template to be used inside the view. The option is checked by default. These content templates are usually called "Loop item in {view_name}". These content templates are unassigned.

- Archive: Archive are another concept from WordPress, they are special pages that correspond to special URLs:
- /products: Is the archive page for the custom post type Products. It will list all products.
- /category/auto: Is the archive page for the term "auto" from the taxonomy "category". It will list all posts that are under the category "auto".
- /author/jhon: Is the archive page of the author. It will display all posts created by the author "Jhon"
- /2020/02/: Is a chronological archive only available for the default post type "posts". It will list all the posts created in October 2020

I hope this explains a bit how WordPress and Toolset works. Let me know if you have any doubts about something.