Bộ lọc đối tượng php

Chúng tôi đã kết hợp nhiều hook và bộ lọc khác nhau trong plugin Xếp hạng toán học SEO mà các nhà phát triển có thể sử dụng để tương tác với đầu ra dữ liệu bằng toán học xếp hạng. Bạn có thể kiểm soát dữ liệu Rank Math từ bên trong chủ đề/plugin của mình. Trước khi xem qua các bộ lọc và hook khác nhau mà Rank Math cung cấp, chúng ta sẽ thảo luận về cách thêm chúng vào trang web của bạn

Thêm Bộ lọc và Móc trong toán học xếp hạng. php

Thêm bộ lọc và hook vào các chức năng của chủ đề của bạn. php là một phương pháp phổ biến trong thực tế và khi được thêm vào, chúng sẽ hoạt động tốt trong hầu hết các trường hợp. Tuy nhiên, chúng tôi khuyến khích bạn thêm các bộ lọc này vào

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
54 vì nó liên quan đến các lợi ích như

1 Tính linh hoạt trong việc chuyển đổi chủ đề

Khi bạn thêm các đoạn mã vào chức năng của chủ đề. php, bạn có nguy cơ mất tất cả các tùy chỉnh đã thêm trong khi chuyển đổi chủ đề và sẽ thực sự tẻ nhạt khi xác định tất cả các đoạn mã Xếp hạng Math được sử dụng và thêm đoạn mã tương tự vào chủ đề mới của bạn

Bằng cách thêm tất cả các đoạn mã SEO của Rank Math vào một tệp riêng biệt, bạn sẽ có thể linh hoạt chuyển đổi chủ đề. Tất cả những gì bạn phải làm là tải xuống một bản sao xếp hạng toán học của mình. php từ chủ đề cũ của bạn và tải nó lên thư mục chủ đề mới của bạn. Sau đó, tất cả các tùy chỉnh Xếp hạng Toán học của bạn sẽ hoạt động giống như trước đây

2 Mã chỉ chạy với Plugin

Khi bạn thêm bộ lọc vào các chức năng của chủ đề. php, mã chạy trên trang web của bạn ngay cả khi plugin Xếp hạng Math không hoạt động. Nhưng khi cộng vào hạng-toán. php, mã chỉ chạy khi plugin Xếp hạng Toán học đang hoạt động, vì plugin bao gồm tệp. Phương pháp này sẽ giúp bạn đảm bảo rằng trang web của bạn chạy nhanh nhất có thể

3 Đảm bảo tất cả các hàm toán học xếp hạng đều hoạt động

Một số bộ lọc như bộ lọc liên quan đến việc tùy chỉnh OpenGraph cần được bao bọc trong móc nối

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
55. Có nhiều lý do tại sao chúng có thể không hoạt động như dự định khi được thêm vào các chức năng. php và để hoạt động như mong đợi, chúng cần được thêm vào rank-math. php

Để giữ cho mọi thứ bớt phức tạp hơn, chúng tôi khuyên bạn nên thêm tất cả các hàm Xếp hạng Toán vào xếp hạng-math. php thay vì thêm chúng vào các chức năng của chủ đề của bạn. php

Cách thêm đoạn mã vào xếp hạng toán học. php?

Để bắt đầu thêm các đoạn mã vào rank-math. php, trước tiên bạn cần tạo tệp. Bạn có thể dễ dàng thực hiện việc này với Trình quản lý tệp FTP hoặc cPanel

1 Tạo toán học xếp hạng. tệp php

Nếu bạn đang sử dụng FTP, hãy điều hướng đến thư mục chủ đề của bạn [/wp-content/themes/theme-name/] rồi tạo một tệp mới có tên rank-math. php như hình bên dưới

Nếu bạn đang sử dụng cPanel, thì bạn có thể sử dụng Trình quản lý tệp của họ để tạo tệp mới có tên rank-math. php bên trong thư mục chủ đề của bạn [/wp-content/themes/theme-name/] như hình bên dưới

2 Điều hướng đến Trình chỉnh sửa tệp chủ đề

Khi bạn đã tạo tệp Xếp hạng Math trong thư mục chủ đề của mình, bạn có thể chỉnh sửa tệp bằng cách điều hướng đến Giao diện > Trình chỉnh sửa tệp chủ đề [đối với Chủ đề cổ điển] hoặc Công cụ > Trình chỉnh sửa tệp chủ đề [đối với Chủ đề khối] trong khu vực quản trị WordPress của bạn

Phía bên phải màn hình của bạn liệt kê tất cả các tệp và mẫu chủ đề. Các tệp được hiển thị ở đây sẽ khác nhau tùy thuộc vào chủ đề bạn đang sử dụng trên trang web của mình. Bạn có thể truy cập thứ hạng-math. php mà bạn đã tạo ở bước trước từ danh sách tệp

3 Thêm Mã của bạn

Bạn có thể thấy trình chỉnh sửa mã có sẵn ở giữa màn hình của mình và đây là nơi bạn có thể thêm các đoạn mã [mà chúng ta sẽ sớm thảo luận trong bài viết này]

4 Lưu thay đổi

Khi bạn đã thêm đoạn mã, hãy nhấp vào nút Cập nhật tệp ở cuối màn hình để lưu các thay đổi của bạn

Trong khi thêm đoạn mã của bạn, nếu bạn vô tình mắc phải bất kỳ lỗi nào có thể làm hỏng trang web của mình, thì trình chỉnh sửa tệp chủ đề sẽ báo lỗi mà không lưu tệp để bạn có thể sửa chúng ngay lập tức. Khi bạn đã cập nhật tệp thành công, bạn có thể kiểm tra trang web của mình để biết các thay đổi/cấu hình dự kiến ​​với bộ lọc/hook

Bây giờ chúng ta đã hiểu cách sử dụng thứ hạng-math. php, chúng tôi sẽ xem xét các bộ lọc và hook khác nhau có sẵn để bạn sử dụng

Mục lục

Cài đặt

1. Bộ lọc để thay đổi mức độ ưu tiên Xếp hạng Metabox

Sử dụng bộ lọc này để thay đổi mức độ ưu tiên của siêu hộp Toán học Xếp hạng thành thấp, để nó xuất hiện sau các siêu hộp khác như trường ACF

/**
 * Change the Rank Math Metabox Priority
 *
 * @param array $priority Metabox Priority.
 */
add_filter[ 'rank_math/metabox/priority', function[ $priority ] {
 return 'low';
}];

2. Bộ lọc để thay đổi Giới hạn từ khóa trọng tâm

Sử dụng bộ lọc này để tăng hoặc giảm số lượng từ khóa trọng tâm tối đa có thể được thêm vào trong một bài đăng hoặc trình chỉnh sửa trang. Người dùng Rank Math PRO đã có khả năng thêm từ khóa không giới hạn và bộ lọc này sẽ không hạn chế số lượng từ khóa cho người dùng PRO

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];

3. Lọc để thêm/xóa phần vào bảng tùy chọn Cài đặt chung

Bộ lọc này cho phép bạn thêm hoặc xóa một phần khỏi bảng tùy chọn cài đặt chung của plugin Xếp hạng toán học

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];

4. Lọc để thêm/xóa phần vào bảng tùy chọn Cài đặt tiêu đề

Bạn có thể thêm hoặc xóa phần tùy chỉnh vào hoặc khỏi bảng tùy chọn Cài đặt tiêu đề bằng cài đặt này

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];

5. Lọc để cho phép nhà phát triển thêm các trường tùy chọn để kiểm tra cập nhật. Và nếu được cập nhật, hãy xóa các quy tắc viết lại

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];

6. Bộ lọc để cho phép nhà phát triển thêm tab mới vào bảng tùy chọn

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];

7. Bộ lọc để thêm/cập nhật/xóa bài kiểm tra Phân tích nội dung

Bộ lọc này cho phép bạn thêm/cập nhật/xóa các bài kiểm tra phân tích nội dung. Để xóa bất kỳ bài kiểm tra nào, bạn chỉ cần hủy đặt bài kiểm tra như minh họa trong hướng dẫn này

________số 8

8. Lọc để thay đổi một số mục cần nhập mỗi lần chạy. Được sử dụng khi nhập dữ liệu từ các plugin khác

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];

9. Lọc để thêm/xóa mục khỏi nút Thanh quản trị

Thêm hoặc xóa một mục khỏi menu trên thanh quản trị viên WordPress mà Rank Math thêm vào giao diện người dùng của trang web WordPress của bạn

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
0

10. Thêm vào Giá trị mặc định cho Cài đặt chung trong khi cài đặt plugin

Đặt giá trị mặc định cho cài đặt chung khi cài đặt Rank Math trên trang web WP. Tham khảo các tùy chọn và

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
1

11. Thêm vào Giá trị mặc định cho Cài đặt tiêu đề trong khi cài đặt plugin

Sử dụng bộ lọc này để đặt giá trị mặc định cho cài đặt Tiêu đề SEO và Meta khi Xếp hạng Math được cài đặt trên trang web. Tham khảo đến

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
0

12. Thêm vào Giá trị mặc định cho Cài đặt sơ đồ trang web trong khi cài đặt plugin

Sử dụng bộ lọc để đặt giá trị mặc định cho cài đặt sơ đồ trang web. Tham khảo các tùy chọn và

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
1

13. Cho phép nhà phát triển thêm/xóa/thay đổi Mô-đun

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
2

14. Lọc để thay đổi cơ sở Tác giả

Sử dụng bộ lọc này để thay đổi cơ sở URL cho kho lưu trữ của tác giả. Khi cơ sở tác giả được định cấu hình để sử dụng bộ lọc này, do người dùng đặt trong Toán xếp hạng > Tiêu đề & Meta > Tác giả sẽ không có bất kỳ ảnh hưởng nào

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
3

15. Bộ lọc để thay đổi định dạng phần địa chỉ

Bộ lọc này cho phép bạn thay đổi định dạng phần địa chỉ cho Rank Math

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
4

16. Bộ lọc để thay đổi các đối số trong truy vấn vị trí

Bộ lọc này cho phép bạn thay đổi các đối số truy vấn để truy xuất vị trí khi bạn sử dụng mã ngắn Vị trí và Khối Doanh nghiệp Địa phương trong Toán học Xếp hạng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
5

17. Lọc để thay đổi các biểu tượng Loại bài đăng trong bảng tùy chọn

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
6

18. Bộ lọc để thay đổi các biểu tượng Phân loại trong bảng tùy chọn

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
7

19. Lọc để bật/tắt tùy chọn biểu tượng lớp phủ trong Tab xã hội trong Cài đặt bài đăng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
8

20. Lọc để bật/tắt Metabox Đề xuất liên kết cho loại bài đăng cụ thể

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
9

21. Bộ lọc để đặt loại Đoạn trích mặc định cho loại bài đăng

Sử dụng bộ lọc này để đặt mặc định  cho từng loại bài đăng trong Rank Math > Titles & Meta settings

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
0

22. Bộ lọc để đặt loại Bài viết đoạn trích mặc định cho loại bài đăng

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
1

23. Lọc để thêm thay thế biến tùy chỉnh

Sử dụng bộ lọc này để sửa đổi

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
56, 
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
57, 
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
58 và 
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
59 của các biến Xếp hạng Toán học hiện có

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
2

24. Thêm các biến bổ sung vào Danh sách thả xuống toán học xếp hạng trong Cài đặt tiêu đề & meta

Bộ lọc này cho phép bạn thêm các biến bổ sung sẽ xuất hiện trong danh sách thả xuống Xếp hạng Tiêu đề Toán học & cài đặt Meta cũng như trong danh sách

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
3

25. Bộ lọc để hiển thị/ẩn SEO Metabox

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
4

26. Lọc để thay đổi Dấu phân cách %sep%

Bộ lọc này cho phép bạn đặt được sử dụng trong thẻ tiêu đề. Nếu ký tự phân tách được đặt bằng bộ lọc này thì nó sẽ ghi đè Ký tự phân cách do người dùng đặt trong Toán xếp hạng > Tiêu đề & Meta > Meta toàn cầu

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
5

27. Bộ lọc để tắt email thông báo tự động cập nhật

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
6

28. Lọc để chỉnh sửa email thông báo tự động cập nhật

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
7

29. Thêm các từ quyền lực tùy chỉnh để phân tích

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
8

30. Lọc để thay đổi Chế độ cài đặt mặc định [Dễ hoặc Nâng cao]

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/general', function[ $tabs] {
	unset[ $tabs['htaccess'] ]; // Unsets Edit .htaccess tab.
	return $tabs;
}];
9

31. Các bộ lọc để thay đổi ký tự dấu tách CSV trong tệp Trình nhập CSV

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
0

32. Ẩn Tùy chọn Báo cáo Email

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
1

33. Sử dụng ID email của quản trị viên để báo cáo qua email

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
2

34. Thay đổi URL Nút Báo cáo SEO Email

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
3

35. Google Analytics – Theo dõi vai trò người dùng nhất định ngay cả khi tùy chọn Loại trừ người dùng đã đăng nhập được BẬT

Bộ lọc này sẽ ghi đè tính năng này và cho phép bạn bỏ đặt các vai trò người dùng cụ thể khỏi bị bỏ qua

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
4

36. Bộ lọc để thay đổi giới hạn Post Meta Table

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
5

37. Lọc để cho phép ngắt dòng trong các khối Câu hỏi thường gặp và Lược đồ HowTo

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
6

38. Lọc để Tắt chức năng Kiểm tra tên miền

Bộ lọc này bỏ qua việc kiểm tra xem có bất kỳ sự không khớp nào trong Địa chỉ trang web và URL WordPress trong cài đặt có thể gây ra sự cố khi kích hoạt trên một số thiết lập không

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
7

39. Lọc để vô hiệu hóa mã hóa dữ liệu nhạy cảm

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
8

40. Lọc để vô hiệu hóa đề xuất từ ​​khóa tập trung từ Google

/**
 * Allow developers to add new section into general setting option panel.
 *
 * @param array $tabs
 */
add_filter[ 'rank_math/settings/title', function[ $tabs] {
 return $tabs;
}];
9

41. Lọc để Sửa đổi dữ liệu Chuyển hướng trước khi cập nhật Chuyển hướng

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
0

Sơ đồ trang web

1. Bộ lọc để thay đổi Cơ sở URL Sơ đồ trang web

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
1

2. Lọc để thay đổi thư mục Sitemap Cache

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
2

3. Bộ lọc để bật/tắt bộ nhớ đệm Sơ đồ trang web

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
3

4. Bộ lọc để thay đổi chế độ bộ nhớ đệm Sơ đồ trang web

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
4

5. Lọc để loại trừ loại bài đăng khỏi Sơ đồ trang web

Bộ lọc này sẽ ghi đè tùy chọn có sẵn trong Toán xếp hạng > Cài đặt sơ đồ trang web > Loại bài đăng

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
5

6. Lọc mục sơ đồ trang web trước khi nó được thêm vào sơ đồ trang web

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
6

7. Bộ lọc để thay đổi/xóa url lưu trữ, plugin sử dụng trong Sơ đồ trang web XML

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
7

8. Lọc để thay đổi/xóa Post URL, plugin sử dụng trong sitemap

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
8

9. Lọc để loại trừ phân loại khỏi Sơ đồ trang web

Bộ lọc này sẽ ghi đè tùy chọn có sẵn trong Toán xếp hạng > Cài đặt sơ đồ trang web > Phân loại

/**
 * Allow developers to add option fields to check against updatation.
 * And if updated flush the rewrite rules.
 *
 * @param array $flush_fields Array of fields id for which we need to flush.
 */
add_filter[ 'rank_math/flush_fields', function[ $fields] {
 return $fields;
}];
9

10. Lọc để loại trừ các cụm từ trống khỏi Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
0

11. Bộ lọc để xóa/thay đổi hình ảnh được bao gồm cho bài đăng trong sơ đồ trang web XML

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
1

12. Lọc để xóa tín dụng Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
2

13. Lọc để thêm các URL bổ sung vào Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
3

Thay thế

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
60 bằng
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
61 hoặc
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
62 tùy thuộc vào việc bạn muốn URL được đưa vào sơ đồ trang của bài đăng hay trang – tương ứng

14. Lọc để thêm tệp KML Vị trí trong Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
4

15. Lọc để thêm URL hình ảnh CDN vào Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
5

16. Bộ lọc để phát hiện URL sơ đồ trang web của bên thứ ba trong Search Console

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
6

17. Bộ lọc để thay đổi đối số truy vấn người dùng cho danh sách sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
7

18. Lọc để thêm URL `noindex` vào Sơ đồ trang web

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
8

19. Lọc để thêm Sơ đồ trang web bên ngoài vào Sơ đồ trang web Toán học xếp hạng

/**
 * Allow developers to add new tabs into option panel.
 *
 * The dynamic part of hook is, page name without 'rank-math-' prefix.
 *
 * @param array $tabs
 */
add_filter[ "rank_math/admin/options/{$filter}_tabs", function[ $tabs ] {
 return $tabs;
}];
9

20. Lọc để thêm nội dung trong sơ đồ trang web mới

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
0

21. Lọc các tiêu đề HTTP của sơ đồ trang web

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
1

22. Thay đổi nội dung bài đăng trước khi chuyển nó tới Image Parser

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
2

23. Bộ lọc để thay đổi thứ tự sắp xếp trong Sơ đồ trang web HTML

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
3

24. Bộ lọc để thay đổi trạng thái bài đăng được đưa vào Sơ đồ trang web HTML

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
4

25. Bộ lọc để thay đổi loại bài đăng được đưa vào Sơ đồ trang web HTML

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
5

26. Bộ lọc để thay đổi các nguyên tắc phân loại được đưa vào Sơ đồ trang web HTML

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
6

27. Lọc để xóa tab Sơ đồ trang web HTML khỏi Cài đặt Sơ đồ trang web

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
7

Tệp âm thanh

1. Lọc để ngăn thêm dữ liệu podcast vào nguồn cấp dữ liệu WP

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
8

2. Bộ lọc để xóa không gian tên nguồn cấp dữ liệu Podcast

/**
 * Allow developers to modify the test or score.
 *
 * @param array  $tests Array of tests with score
 * @param string $type  Object type. Can be post, user or term.
 */
add_filter[ 'rank_math/researches/tests', function[ $tests, $type ] {
 return $tests;
}, 10, 2 ];
9

3. Bộ lọc để sửa đổi các URL trung tâm

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
0

4. Lọc để ngăn Rank Math tự động xuất bản nguồn cấp dữ liệu lên Pubhubsubbub

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
1

5. Lọc để thay đổi Tác nhân người dùng được sử dụng để xuất bản nguồn cấp dữ liệu lên Pubhubsubbub

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
2

6. Bộ lọc để thay đổi tiêu đề của tập podcast

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
3

vụn bánh mì

1. Lọc để thay đổi Cài đặt Breadcrumb

Bộ lọc sẽ ghi đè lên bộ lọc do người dùng chọn trong Toán học xếp hạng > Cài đặt chung > Breadcrumbs

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
4

2. Bộ lọc để thay đổi Chuỗi Breadcrumb

Bộ lọc sẽ ghi đè lên các chuỗi breadcrumbs do người dùng chọn trong Toán học xếp hạng > Cài đặt chung > breadcrumbs

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
5

3. Bộ lọc để thay đổi Breadcrumb args

Bộ lọc này cũng cho phép bạn thay đổi các đối số breadcrumb và giao diện của breadcrumb trên giao diện người dùng

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
6

4. Bộ lọc để thay đổi HTML Breadcrumb

Bộ lọc này cho phép bạn thực hiện bất kỳ thay đổi nào đối với Breadcrumb HTML trên giao diện người dùng

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
7

5. Lọc để thay đổi đầu ra thuật ngữ chính của lớp breadcrumbs

Bạn có thể sử dụng bộ lọc này để thay đổi đầu ra thuật ngữ chính của lớp breadcrumbs một cách linh hoạt ở giao diện người dùng

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
8

6. Bộ lọc để thay đổi/xóa các mục breadcrumb

Bộ lọc này cho phép các nhà phát triển thực hiện bất kỳ thay đổi nào hoặc xóa bất kỳ mục breadcrumb nào một cách linh hoạt trên giao diện người dùng. Khi bạn thay đổi/xóa mục breadcrumb với bộ lọc này, các thay đổi cũng sẽ phản ánh trong Lược đồ breadcrumb

/**
 * Number of items to import per run.
 *
 * @param int $items_per_page Default 100.
 */
add_filter[ 'rank_math/importers/items_per_page', function[ $items_per_page ] {
 return $items_per_page;
}];
9

7. Lọc để thay đổi/xóa các mục breadcrumb khỏi Breadcrumb Snippet

Những thay đổi được thực hiện bằng cách sử dụng bộ lọc này sẽ chỉ ảnh hưởng đến Lược đồ Breadcrumb

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
00

Metadata

1. Lọc để thay đổi Tiêu đề

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
01

2. Mã để di chuyển tiêu đề bên trong hộp meta Xếp hạng Math

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
02

3. Bộ lọc để thay đổi mô tả meta

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
03

4. Sử dụng Mô tả từ Cài đặt chung, nếu mô tả bị thiếu trong metabox Bài đăng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
04

5. Bộ lọc để thay đổi dữ liệu rô bốt

Sử dụng bộ lọc này để thay đổi meta rô bốt được thêm bởi Rank Math một cách linh hoạt trên giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
05

6. Bộ lọc để thay đổi Canonical URL

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
06

7. Bộ lọc để xóa thông báo tín dụng plugin được thêm vào nguồn trang

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
07

8. Lọc để tắt các liên kết liền kề [ next/prev ]

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
08

9. Lọc để thay đổi đầu ra liên kết liền kề

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
09

10. Lọc để thêm thẻ meta Từ khóa

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
10

11. Bộ lọc để thay đổi từ khóa meta

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
11

12. Lọc để cho phép mã ngắn trong siêu dữ liệu

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
12

13. Lọc để cho phép mã ngắn trong mô tả lược đồ Sản phẩm

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
13

MởGraph

1. Lọc để thay đổi Loại biểu đồ mở [ của. loại hình ]

Sử dụng bộ lọc này để thay đổi loại OpenGraph cho trang cụ thể trên giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
14

2. Lọc để thay đổi URL OpenGraph [ og. url ]

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
15

3. Bộ lọc để xóa thẻ Twitter khỏi đầu ra trang

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
16

4. Bộ lọc để thay đổi Hình ảnh OpenGraph

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
17

5. Bộ lọc để cho phép nhà phát triển thêm hình ảnh bổ sung

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
18

6. Bộ lọc để ngăn cài đặt hình ảnh mặc định trong OpenGraph

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
19

7. Bộ lọc để ngăn cài đặt hình ảnh từ nội dung khi hình ảnh không được thêm vào OpenGraph

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
00

8. Bộ lọc để xác định kích thước hình ảnh để hiển thị trong og. hình ảnh, twitter. hình ảnh

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
01

9. Lọc để thay đổi các thẻ meta xã hội cụ thể

Bộ lọc này cho phép bạn tự động thay đổi các thẻ meta xã hội cụ thể trên giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
02

10. Bộ lọc để thay đổi loại thẻ twitter

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
03

11. Móc để xóa thẻ OpenGraph

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
04

12. Ngăn chặn đầu ra của giá

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
05

Sử dụng bộ lọc này để xóa các thẻ meta 

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
63 & 
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
64 

13. Thay đổi văn bản để tính thời gian đọc

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
06

14. Thay đổi số từ mỗi phút để tính thời gian đọc

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
07

15. Lọc để cho phép đường dẫn CDN trong hình ảnh lớp phủ

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
08

Đoạn giàu

1. Mã để xóa dữ liệu json+ld

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
09

2. Bộ lọc để mở rộng dữ liệu json+ld

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
10

3. Lọc để loại bỏ Lược đồ BreadcrumbList

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
11

4. Lọc để loại bỏ CollectionPage Schema trên các trang phân loại

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
12

5. Lọc để tắt Hiển thị đánh giá trên giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
13

6. Lọc để thay đổi vị trí Hiển thị Đánh giá

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
14

7. Lọc để thay đổi văn bản lựa chọn của Người biên tập đánh giá

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
15

8. Bộ lọc để thay đổi HTML Đoạn đánh giá

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
16

9. Lọc để xóa Dữ liệu lược đồ khỏi Bài đăng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
17

10. Lọc để thay đổi dữ liệu Lược đồ mặt trước của bài đăng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
18

11. Thêm tên thương hiệu cho sản phẩm

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
19

12. Lọc để xóa thuộc tính
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
65 khỏi Lược đồ tác giả bài đăng

Bộ lọc này hữu ích khi bạn có các nhà văn khách mời

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
20

13. Lọc để thay đổi nội dung mã ngắn

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
21

14. Lọc để xóa
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
65 khỏi Thực thể Tác giả

Nếu tác giả bài đăng không làm việc cho công ty của bạn hoặc là tác giả khách, thì hãy sử dụng bộ lọc này để xóa thuộc tính

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
65 khỏi thực thể Tác giả

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
22

15. Bộ lọc để thay đổi tiêu đề Tệp đính kèm của hình thu nhỏ video

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
23

16. Bộ lọc để thay đổi Tên tệp của hình thu nhỏ video

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
24

Điểm SEO

1. Bộ lọc để thay đổi các tham số cho đầu ra Điểm SEO Mặt trận

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
25

2. Bộ lọc để thay đổi đầu ra HTML cho chức năng Front End SEO Score

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
26

3. Lọc để thay đổi backlink bên trong đầu ra Front End SEO Score

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
27

4. Bộ lọc ẩn điểm SEO

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
28

chuyển hướng

1. Thay đổi số lượng chuyển hướng để xử lý cùng một lúc

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
29

2. Lọc để vô hiệu hóa việc thêm chuỗi truy vấn vào URL chuyển hướng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
30

3. Bộ lọc để tắt chuyển hướng sản phẩm tùy chỉnh

Sử dụng bộ lọc này để tắt chuyển hướng sản phẩm tùy chỉnh khi tùy chọn này được bật hoặc được bật cho các sản phẩm WooC Commerce

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
31

4. Bộ lọc để loại bỏ các dấu gạch chéo hàng đầu cho các chuyển hướng Regex

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
32

Gutenberg

1. Lọc để tắt Tích hợp toán học xếp hạng từ Thanh bên Gutenberg

Sử dụng bộ lọc này để xóa tích hợp Xếp hạng Toán học khỏi Thanh bên Gutenberg và thêm các hộp meta cũ bên dưới khu vực nội dung

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
33

2. Bộ lọc để thêm các khóa meta để xử lý dữ liệu trong Gutenberg

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
34

Khi sử dụng metakey này, vui lòng đặt trước nó bằng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
68

3. Bộ lọc để thêm siêu dữ liệu để xếp hàng cho việc sử dụng Gutenberg

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
35

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
69 có thể là bài đăng, thuật ngữ và người dùng

phần tử

1. Bộ lọc để xóa Tab SEO trong Elementor Editor

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
36

Divi

1. Bộ lọc để xóa Tab SEO trong Divi Editor

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
37

linh tinh

1. Lọc để thay đổi redirect_url của tệp đính kèm Chuyển hướng đến bài đăng gốc của nó

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
38

2. Lọc để xóa thẻ rel nofollow khỏi liên kết RSS

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
39

3. Lọc để cho phép hiển thị động/ẩn chân trang RSS trong mục nguồn cấp dữ liệu RSS

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
40

4. Lọc để thêm/xóa nội dung trước mục nguồn cấp RSS

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
41

5. Lọc để thêm/xóa nội dung sau mục nguồn cấp RSS

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
42

6. Lọc để xóa rel=”noopener” khỏi các liên kết bên ngoài

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
43

7. Bộ lọc để tắt tính năng thuật ngữ chính

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
44

8. Bộ lọc để xóa tham số truy vấn `?replytocom` khỏi URL

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
45

9. Bộ lọc để loại bỏ Đoạn trích Blog trên trang chủ

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
46

10. Lọc để ngăn Rank Math thay đổi admin_footer_text

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
47

11. Xóa thuộc tính noopener dựa trên tên miền

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
48

12. Xóa mọi thứ liên quan đến Xếp hạng Toán khỏi Cơ sở dữ liệu

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
49
  1. Thêm đoạn mã trên vào tệp
    /**
     * Change the Focus Keyword Limit
     */
    add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
        return 10; // Number of Focus Keywords. 
    }];
    70 của chủ đề [đoạn mã trên sẽ không hoạt động trong tệp
    /**
     * Change the Focus Keyword Limit
     */
    add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
        return 10; // Number of Focus Keywords. 
    }];
    71]
  2. Vô hiệu hóa và xóa plugin Rank Math

13. Bộ lọc để tùy chỉnh URL tìm kiếm cho Hộp tìm kiếm liên kết trang web

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
50

14. Bộ lọc để thêm plugin vào Danh sách Mục lục

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
51

15. Lọc để xóa lớp
/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
72 khỏi liên kết nội dung giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
52

16. Lọc để ẩn Thanh thống kê Analytics khỏi giao diện người dùng

/**
 * Change the Focus Keyword Limit
 */
add_filter[ 'rank_math/focus_keyword/maxtags', function[] {
    return 10; // Number of Focus Keywords. 
}];
53

Và, đó là nó. Chúng tôi hy vọng bài viết hữu ích trong việc tận dụng các bộ lọc và hook khác nhau có sẵn với Rank Math. Nếu bạn có bất kỳ câu hỏi nào hoặc cần bất kỳ trợ giúp nào trong việc sử dụng các bộ lọc này, vui lòng liên hệ trực tiếp với nhóm hỗ trợ của chúng tôi từ đây và chúng tôi luôn sẵn sàng trợ giúp

Chủ Đề