Fragments

Fragments are collections of template parts that can be used globally across multiple templates.

By default, there are fragments for both a global header and a global footer but you can create your own fragments and add template parts to them.

By default, headers are automatically set at the top, and footers at the bottom of your page.

The Fragments Tab allows you to add global headers and footers as well as any other template parts throughout your website to speed up your workflow.

You can set conditions for where and when a global part appears with no need to add them manually to a template.

You can also use quick access buttons to create template parts and add fragments.

Open

  • Navigate to the Wordpress Dashboard

  • Find Cwicly.

  • Click to open the Fragments tab.

The Global Header Fragment allows you to regroup the template parts you want to appear globally in the Header position at the top of the page.

The Global Footer Fragment allows you to regroup the template parts you want to appear globally in the Footer position at the bottom of the page.

From here, you can set the conditions for how and when they appear to speed up your workflow and improve organisation.

Add

  • Navigate to the Wordpress Dashboard

  • Find Cwicly.

  • Click to open the Fragments tab.

  • Find Global Header or Footer.

  • Click "+" button to add a new template part.

Select

  • Click "Select Template Part" in the dropdown and choose which template part you wish to edit, apply conditions to or delete.

Edit

The Edit template icon allows you quick access to the Editor where you can edit the selected template within the fragment.

Either click anywhere in the template part or click the edit icon to take you to the Editor.

  • Click "Edit" icon to take you to the template editor.

  • Click the "Edit" icon or anywhere in the template to open in the Editor.

Set Visibility Conditions

Visibility Conditions can be set for your Global Header or Footer to allow you to choose how and when you want each template part in the fragment to be displayed.

  • Find the global template part to which you want to set Visibility Conditions.

  • Click the Visibility Conditions icon to open the Conditions modal.

  • Set required conditions.

  • Click "X" icon to close modal.

For detailed information about visibility conditions and operators, please see Visibility Condition.

Remove

Global template parts Headers and Footers can be removed from a fragment.

This will not permanently delete the template part but simply remove it from the fragment.

  • Select template part you wish to remove from a fragment.

  • Click the "Delete" icon to remove.

Create Template Part

The Create Template Part is a quick access button which allows you to add a template part without being redirected to the editor's template parts section.

You can name your template part and then edit its content once it has been added to a fragment.

  • Navigate to the Wordpress Dashboard.

  • Click to open the Global Parts tab.

  • Navigate to Fragments.

  • Click quick access button "+ Template Part" to open the New Template Part modal.

  • Input required template part name.

  • Click "Create" to create template part.

  • Click "X" icon to close Create Template Parts modal

Custom Fragment

You can create a custom fragment to which you can add one or multiple template part(s) to your new custom fragment.

You can name your fragment and then edit its content once it has been added to the Cwicly Themer as a custom fragment.

Your Custom fragments are visible in the Fragment tab under "Custom".

Add

  • Navigate to the Wordpress Dashboard.

  • Click to open the Global Parts tab.

  • Navigate to Fragments.

  • Click " + Fragment" button to open the "New Fragment" modal.

  • Input required Fragment name.

  • Click "Create" to create Fragment.

  • Click "X" icon to close Fragment modal.

  • The new fragment is visible in the Custom section.

Add Template Part

Add Template Part allows you to add template parts to your Custom fragment.

  • Navigate to the Wordpress Dashboard.

  • Click to open the Global Parts tab.

  • Navigate to Fragments.

  • Navigate to Fragment to which you wish to add a template part.

  • Click "+" icon to add a new template part.

Rename

This allows you to rename a Custom fragment.

  • Navigate to the Wordpress Dashboard.

  • Click to open the Global Parts tab.

  • Navigate to Fragments.

  • Navigate to the Fragment t you wish to rename.

  • Click "Rename" icon to open the "Rename Fragment" modal.

  • Input required name and click "Rename".

Remove

The Remove Fragment icon allows you to remove a Custom fragment.

  • Navigate to the Wordpress Dashboard.

  • Click to open the Global Parts tab.

  • Navigate to Fragments.

  • Navigate to Fragment to be removed.

  • Click remove icon to delete Fragment permanently.

This will not delete the template parts in the fragment.

Last updated