Add translation of View with Polylang plugin

The Polylang plugin helps you to create multilingual WordPress website.
And our Content Views Pro plugin helps you to show WordPress content of these languages easily.
For most case, you only need to create one View for all languages (read more).
But sometimes you need to create each View for each language, that is supported by Content Views Pro too.

Set language for a View

  • In the admin Content Views > All Views page, mouse over the View which you want to set language, click Edit Language:
    CVP with Polylang - edit view language
  • It will navigate you to a page, where you can select language of the View. After finishing, please click the Update button.

Add translation of a View

For example, you have a View in English, now you want to create the same purpose View in Deutsch, please follow these steps:

  • In the admin Content Views > All Views page, click on the plus “+” icon to add a translation of a View:
    CVP with Polylang - add translation of View
  • Enter the title of the translation View, then click Publish button:
    CVP with Polylang - add title of the translation View
  • The translation View will be created, click the
    [Content Views] Filter Posts Now
    button:
    CVP with Polylang - edit the translation View
  • Notice: This step and below step are required. If not, the translation View won’t be created successfully.

  • It will navigate to the View settings page, change settings there to filter content in new language, then click the Save button:
    CVP with Polylang - filter content of new language

Best regards,

Zigzag thumbnail vertically

Content Views helps you to show the thumbnail image of posts easily without coding.
In the Pro version, you can show thumbnail zigzag vertically (see demo). Here is how to do that with 2 simple clicks:

  • Under “Display Settings” tab, select the option Show thumbnail on the left/right of text of Format
  • Select the checkbox Alternate thumbnail position

CVPro - Vertical zigzag thumbnail


Customization

If you want zigzag thumbnails to touch each other in an edge, like this:
zigzag thumbnail touch in an edge
Please add this code to Custom CSS field (the left textarea) in Content Views >> Settings page:

@media (min-width: 992px) {
#pt-cv-view-VIEW_ID .pt-cv-thumbnail {width: 50%!important; margin-bottom: 0!important;}
#pt-cv-view-VIEW_ID .pt-cv-content-item {padding-bottom: 0!important}
#pt-cv-view-VIEW_ID .pt-cv-title {padding-top: 30px}
}

(replace VIEW_ID with ID of your View)

Notice: This customization only works with the Grid layout.

Live Filter – show checkboxes and radio buttons horizontally in rows and columns (instead of vertical list)

To show Live Filter checkboxes and radio buttons in rows and columns (instead of vertical list), please add this code to Custom CSS field (the left textarea) in Content Views >> Settings page:

.cvp-live-filter,
.cvp-live-filter label {
    display: block!important
}

.cvp-live-filter .checkbox,
.cvp-live-filter .radio {
    display: inline-block;
    width: 33%;
}

/* on mobile */
@media (max-width: 768px) {
    .cvp-live-filter .checkbox,
    .cvp-live-filter .radio {
        width: 50% !important;
    }
}

Please replace 33% by another value to change the number of columns.

Best regards,

Lightbox – change background color, opacity, close icon, etc.

Change background color and opacity around the lightbox:

#cvpboxOverlay {
    background: #000 !important;
    opacity: 0.5 !important;
}

Change the border of the lightbox:

#cvpboxLoadedContent {
    border: 5px solid #000 !important;
}

Change the close icon:

#cvpboxClose {
    background: url(URL_OF_YOUR_CLOSE_ICON_HERE) !important;
}

Lightbox of thumbnail: change title font-size, color, etc.

#cvpboxTitle {
    font-size: 20px;
    color: #ccc;
    font-family: Arial, serif;
}

Pagination – trigger custom Javascript action after clicking a pagination number

Content Views and Content Views Pro helps you to show posts, pages, etc. with pagination easily.

To trigger custom Javascript action after clicking a pagination number, please use this Javascript code:

$('body').on('pt-cv-pagination-finished pt-cv-pagination-finished-simple', function(e, pages_holder, $loaded_content) {
    // add your JS code here
});

It works with Ajax load-more and infinite scrolling pagination too. Your event will be triggered after the new page finishes loading.

Best regards,

Pinterest – display items in a same height

To display Pinterest items in a same height, please add this code to Custom CSS field (the left textarea) in Content Views >> Settings page:

@media (min-width: 992px) {
#pt-cv-view-VIEWID .pt-cv-pinmas {height:300px}
}

and:

  • replace VIEWID with ID of your View
  • replace 300px with relevant height for your View

Notice: There is a space between VIEWID and .pt-cv-pinmas

Best regards,

Control the post info (title, description, image) when you share on Facebook

Content Views Pro helps you to share your WordPress posts via many social networks easily (read more).

One of the most popular networks is Facebook. While sharing on Facebook, the most common issue is the description and image is wrong (or is not what you want). How to fix that?

It is very simple:

  • Install and activate the Yoast SEO plugin.
  • Edit the post which you want to modify the info sharing on Facebook:
    scroll down to the editing page, click the Social tab in “Yoast Seo” box, edit the info as you want:

    CVPro - modify post info sharing on Facebook

Best regards,

Convert some categories to a custom taxonomy

Category and Tag are two default WordPress taxonomies which help you to group posts together easily.
Assuming you have these categories:

  • Category A
    • Subcategory 1a
    • Subcategory 2a
  • Category B
    • Subcategory 1b
    • Subcategory 2b
    • Subcategory 3b

and want to convert Category B and its child categories to a new taxonomy, please follow these steps:

  • Register a new taxonomy

    It is possible using register_taxonomy() function or using another plugin (Custom Post Type UI, Toolset Types, etc.)

  • Add terms to the new taxonomy

    Add Subcategory 1b, Subcategory 2b, Subcategory 3b to new taxonomy CVP - add a new term to WordPress taxonomy

  • Move posts from a child category to new taxonomy term

    The quickest way is:

    + In WordPress admin Posts page, select a specific category (for example: Subcategory 1b), then click “Filter” button to show all matching posts: CVP - filter by category in Posts page

    + Select the top checkbox, select the “Edit” option in the “Bulk Actions” dropdown, then click “Apply” button:
    CVP - bulk actions edit posts WordPress

    + Select the desired term of the new taxonomy:

    CVP - bulk update categories of WordPress posts

    then click the “Update” button.

    Repeat this step for each child category.

  • Remove child categories (optionally)

    After above steps, you might remove child categories which are already replaced by new taxonomy.

Best regards,