• Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
  • Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
home/Knowledge Base/Code snippets/Changing the titles

Changing the titles

405 views 0 April 13, 2021

For dashboard blocks

You can change the title of the blocks shown on the dashboard page (by default Recent files for example). Just insert the following code snippet in your theme’s functions.php file:

function cuar_change_dashboard_block_title($old_title) {
  return 'My new files title';
}
$page_slug = 'customer-private-files';
add_filter('cuar/core/dashboard/block-title?slug=' . $page_slug, 'cuar_change_dashboard_block_title');

For private pages, or any other content type, you will simply need to change the $target_page_slug variable to indicate the page slug which manages this private content type.

For the content list pages

You may change the content list page’s title, for example, the title shown on the “My files” page.

function cuar_change_content_list_page_title($old_title) {
    return 'My title';
}

$page_slug = 'customer-private-pages';
$display_mode = 'category_archive';
add_filter('cuar/core/page/subtitle?slug=' . $page_slug . '&display-mode=' . $display_mode, 'cuar_change_content_list_page_title');

Above, `$display_mode` will either be `default`, `author_archive`, `category_archive` or `date_archive`.

For content associated to a container

Inside a container (e.g. a project) details page, associated content is listed in blocks. Here is a function to change the title for those blocks:

function cuar_change_associated_block_title($old_title) {
  return 'Associated files';
}
$post_type = 'cuar_private_file';
add_filter('cuar/core/page/container-content-subtitle?type=' . $post_type, 'cuar_change_associated_block_title');

The `$post_type` variable allows you to target the various blocks separately.

Was this helpful?

Yes  No
Related Articles
  • Custom admin notification’s recipients
  • Disable CSS resets and allow integration of third party plugins
  • Automatically add a user to a group
  • Changing the default page shown by the Customer Area
  • Changing the page shown after logout
  • Sidebars: how to disable them
Knowledge base
  • Code snippets 25
  • Use cases 2
  • Community links 5
FAQ
  • About licences 7
  • Pre-sales questions 3
  • After-sales questions 1
  • Plugin usage 8
  • Technical questions 10
  • Payments 4
Documentations
  • Getting started
  • Using code snippets
  • The template system
  • Full documentation
Support
  • Pre-sales Enquiries
  • Main plugin support
  • Premium add-ons support
  • Feature Requests
  • Terms and conditions for sales
  • Refund policy
  • Privacy Policy
  • Legal notices
  • Copyright 2021 wp-customerarea.com. All Rights Reserved.