Magento2: How to add custom search fields in the product admin grid?

You do not need to add these. You already have search fields for (almost) each column of the grid.
Just click on the "filters" button at the top right.
But if you insist that the search fields are in the column, under the heading, I do not think it can be done easily. You will have to modify the functioning of the components ui or create your own components ui.
Unfortunately, I do not know where to start.

machine learning – Code for the development of a custom deepfake Obama

I prepare a little surprise for the goodbye of my friend's work and I wanted to make a personalized deepfake video of Obama.

Could someone guide me to a resource or a good place to start with this?

Here is the video link: https://www.youtube.com/watch?v=cQ54GDm1eL0

Thank you!

8 – How can I perform a Webform field custom validation?

I want to perform a custom validation for a field in some of my web forms.
I came across this code:
https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-add-custom-validation-to-a-webform-element

these are the devel webform data
the field I want to validate on id calle idno

I do not understand:

1.What are the values:

$ element['#webform_id'] === & # 39; my_form - field name & # 39;

and where can I take them?

Also, how can I debug this validation?

StdClass object
(
    [__CLASS__] => Drupal  webform  Entity  Webform
    https://drupal.stackexchange.com/q/282474 => qyt_qlyth_mwrwt_mmnwt_wqdmyh_kyt
    [uuid] => ------
    [operation] => 
    [override] => 
    [status] => open
    [open] => 
    [close] => 
    [weight] => 0
    [template] => 
    [archive] => 
    8 - How can i do Webform field custom validation => יט קליטה מקוון - ורות גננות משרד ינוך
    [description] => ישור לאפיון הטופס
     => י אנוש
    [uid] => 1
    [settings] => Table
(
            [ajax] => 
            [ajax_scroll_top] => form
            [page] => 1
            [page_submit_path] => 
            [page_confirm_path] => 
            [form_title] => source_entity_webform
            [form_submit_once] => 
            [form_exception_message] => 
            [form_open_message] => 
            [form_close_message] => 
            [form_previous_submissions] => 1
            [form_confidential] => 
            [form_confidential_message] => 
            [form_remote_addr] => 1
            [form_convert_anonymous] => 
            [form_prepopulate] => 
            [form_prepopulate_source_entity] => 
            [form_prepopulate_source_entity_required] => 
            [form_prepopulate_source_entity_type] => 
            [form_reset] => 
            [form_disable_autocomplete] => 
            [form_novalidate] => 
            [form_disable_inline_errors] => 
            [form_required] => 
            [form_unsaved] => 
            [form_disable_back] => 
            [form_submit_back] => 
            [form_autofocus] => 
            [form_details_toggle] => 
            [form_access_denied] => default
            [form_access_denied_title] => 
            [form_access_denied_message] => 
            [form_access_denied_attributes] => Table
(
)

            [form_file_limit] => 
            [submission_label] => 
            [submission_log] => 
            [submission_views] => Table
(
)

            [submission_views_replace] => Table
(
)

            [submission_user_columns] => Table
(
)

            [submission_user_duplicate] => 
            [submission_access_denied] => default
            [submission_access_denied_title] => 
            [submission_access_denied_message] => 
            [submission_access_denied_attributes] => Table
(
)

            [submission_exception_message] => 
            [submission_locked_message] => 
            [submission_excluded_elements] => Table
(
)

            [submission_exclude_empty] => 
            [submission_exclude_empty_checkbox] => 
            [previous_submission_message] => 
            [previous_submissions_message] => 
            [autofill] => 
            [autofill_message] => 
            [autofill_excluded_elements] => Table
(
)

            [wizard_progress_bar] => 1
            [wizard_progress_pages] => 
            [wizard_progress_percentage] => 
            [wizard_progress_link] => 
            [wizard_start_label] => 
            [wizard_preview_link] => 
            [wizard_confirmation] => 1
            [wizard_confirmation_label] => 
            [wizard_track] => 
            [preview] => 0
            [preview_label] => 
            [preview_title] => 
            [preview_message] => 
            [preview_attributes] => Table
(
)

            [preview_excluded_elements] => Table
(
)

            [preview_exclude_empty] => 1
            [preview_exclude_empty_checkbox] => 
            [draft] => none
            [draft_multiple] => 
            [draft_auto_save] => 
            [draft_saved_message] => 
            [draft_loaded_message] => 
            [confirmation_type] => page
            [confirmation_title] => ופס נשלח בהצלחה
            [confirmation_message] => ירורים יתן ות למחלקת משאבי אנוש
            [confirmation_url] => 
            [confirmation_attributes] => Table
(
)

            [confirmation_back] => 1
            [confirmation_back_label] => 
            [confirmation_back_attributes] => Table
(
)

            [confirmation_exclude_query] => 
            [confirmation_exclude_token] => 
            [limit_total] => 
            [limit_total_interval] => 
            [limit_total_message] => 
            [limit_total_unique] => 
            [limit_user] => 
            [limit_user_interval] => 
            [limit_user_message] => 
            [limit_user_unique] => 
            [entity_limit_total] => 
            [entity_limit_total_interval] => 
            [entity_limit_user] => 
            [entity_limit_user_interval] => 
            [purge] => none
            [purge_days] => 
            [results_disabled] => 
            [results_disabled_ignore] => 
            [token_update] =>
)

    [settingsOriginal] => Table
(
            [ajax] => 
            [ajax_scroll_top] => form
            [page] => 1
            [page_submit_path] => 
            [page_confirm_path] => 
            [form_title] => source_entity_webform
            [form_submit_once] => 
            [form_exception_message] => 
            [form_open_message] => 
            [form_close_message] => 
            [form_previous_submissions] => 1
            [form_confidential] => 
            [form_confidential_message] => 
            [form_remote_addr] => 1
            [form_convert_anonymous] => 
            [form_prepopulate] => 
            [form_prepopulate_source_entity] => 
            [form_prepopulate_source_entity_required] => 
            [form_prepopulate_source_entity_type] => 
            [form_reset] => 
            [form_disable_autocomplete] => 
            [form_novalidate] => 
            [form_disable_inline_errors] => 
            [form_required] => 
            [form_unsaved] => 
            [form_disable_back] => 
            [form_submit_back] => 
            [form_autofocus] => 
            [form_details_toggle] => 
            [form_access_denied] => default
            [form_access_denied_title] => 
            [form_access_denied_message] => 
            [form_access_denied_attributes] => Table
(
)

            [form_file_limit] => 
            [submission_label] => 
            [submission_log] => 
            [submission_views] => Table
(
)

            [submission_views_replace] => Table
(
)

            [submission_user_columns] => Table
(
)

            [submission_user_duplicate] => 
            [submission_access_denied] => default
            [submission_access_denied_title] => 
            [submission_access_denied_message] => 
            [submission_access_denied_attributes] => Table
(
)

            [submission_exception_message] => 
            [submission_locked_message] => 
            [submission_excluded_elements] => Table
(
)

            [submission_exclude_empty] => 
            [submission_exclude_empty_checkbox] => 
            [previous_submission_message] => 
            [previous_submissions_message] => 
            [autofill] => 
            [autofill_message] => 
            [autofill_excluded_elements] => Table
(
)

            [wizard_progress_bar] => 1
            [wizard_progress_pages] => 
            [wizard_progress_percentage] => 
            [wizard_progress_link] => 
            [wizard_start_label] => 
            [wizard_preview_link] => 
            [wizard_confirmation] => 1
            [wizard_confirmation_label] => 
            [wizard_track] => 
            [preview] => 0
            [preview_label] => 
            [preview_title] => 
            [preview_message] => 
            [preview_attributes] => Table
(
)

            [preview_excluded_elements] => Table
(
)

            [preview_exclude_empty] => 1
            [preview_exclude_empty_checkbox] => 
            [draft] => none
            [draft_multiple] => 
            [draft_auto_save] => 
            [draft_saved_message] => 
            [draft_loaded_message] => 
            [confirmation_type] => page
            [confirmation_title] => ופס נשלח בהצלחה
            [confirmation_message] => ירורים יתן ות למחלקת משאבי אנוש

Date: 08-8588119




            [confirmation_url] => 
            [confirmation_attributes] => Table
(
)

            [confirmation_back] => 1
            [confirmation_back_label] => 
            [confirmation_back_attributes] => Table
(
)

            [confirmation_exclude_query] => 
            [confirmation_exclude_token] => 
            [limit_total] => 
            [limit_total_interval] => 
            [limit_total_message] => 
            [limit_total_unique] => 
            [limit_user] => 
            [limit_user_interval] => 
            [limit_user_message] => 
            [limit_user_unique] => 
            [entity_limit_total] => 
            [entity_limit_total_interval] => 
            [entity_limit_user] => 
            [entity_limit_user_interval] => 
            [purge] => none
            [purge_days] => 
            [results_disabled] => 
            [results_disabled_ignore] => 
            [token_update] =>
)

    [access] => Table
(
            [create] => Table
(
                    [roles] => Table
(
                            [0] => anonymous
                            [1] => authenticated
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [view_any] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [update_any] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [delete_any] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [purge_any] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [view_own] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [update_own] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [delete_own] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [administer] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [test] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

            [configuration] => Table
(
                    [roles] => Table
(
)

                    [users] => Table
(
)

                    [permissions] => Table
(
)

)

)

    [elements] => flexbox1:
& # 39; # type: webform_flexbox
fname:
# Type #: text field
& # 39; # title & # 39 ;: #רטי & # 39;
& # 39; # Required: true
lname:
# Type #: text field
& # 39; # title & # 39 ;: #ה & # 39;
& # 39; # Required: true
idno:
# Type #: text field
& # 39; # title & # 39 ;: ודת זהות & # 39;
& # 39; # description & # 39; ין כולל ספרת יקורת & # 39;
& # 39; # input_mask & # 39; 999999999 & # 39;
& # 39; # Required: true
flexbox2:
& # 39; # type: webform_flexbox
sex:
& # 39; # type: radios
& # 39; # title & # 39 ;: ין
& # 39; # options: myn
& # 39; # options_display: two_columns
birth date:
& # 39; # type & date :: date
& # 39; # title & # 39; ריך ידה & # 39;
& # 39; # flex: & # 39; 3 & # 39;
& # 39; # date_date_format & # 39;: yyyymmdd
& # 39; # date_date_element & # 39 ;: datepicker
family status:
& # 39; # type: select
& # 39; # title & # 39 ;: #י & # 39;
# Options #: family_state
& # 39; # Required: true
& # 39; # flex: & # 39; 3 & # 39;
Flex3:
& # 39; # type: webform_flexbox
nom_zug:
# Type #: text field
& # 39; # title & # 39; & הזוג & # 39;
zug_id:
# Type #: text field
& # 39; # title & # 39 ;: ודת זהות בן הזוג & # 39;
& # 39; # description & # 39; ין כולל ספרת יקורת & # 39;
& # 39; # input_mask & # 39; 999999999 & # 39;
& # 39; # Required: true
zug_bday:
& # 39; # type & date :: date
& # 39; # title: & # 39; ריך לידה בן הזוג & # 39;
& # 39; # date_date_format & # 39;: yyyymmdd
& # 39; # date_date_element & # 39 ;: datepicker
Flex4:
& # 39; # type: webform_flexbox
street:
# Type #: text field
& # 39; # title & # 39 ;: רחוב
house number:
# Type #: text field
& # 39; # title & # 39 ;: # ת ת ת ת
appartment_num:
# Type #: text field
& # 39; # title: & # 39; ר דירה & # 39;
FLEX5:
& # 39; # type: webform_flexbox
yswb:
& # 39; # type: select
& # 39; # title & # 39 ;: ישוב
& # 39; # options: yswb
myqwd:
# Type #: text field
& # 39; # title & # 39 ;: יקוד
# Size: 7 & # 39;
& # 39; # input_mask & # 39; 9999999 & # 39;
& # 39; # Required: true
E-mail:
& # 39; # type: email
& # 39; # title & # 39 ;: #וא"ל & # 39;
& # 39; # Required: true
flex6:
& # 39; # type: webform_flexbox
cellular:
# Type #: text field
& # 39; # title & # 39 ;: ולרי
& # 39; # input_mask & # 39 ;: & # 39; 0599999999 & # 39;
phone:
# Type #: text field
& # 39; # title & # 39 ;: ון בבית & # 39;
# Size: 10 & # 39;
# Input_mask # 0999999999 # input_mask
kupat_cholim:
& # 39; # type: select
& # 39; # title & # 39; ופת חולים & # 39;
& # 39; & # 39 # option ;:
2: ית
3: ומית
4: י
7: וחדת
& # 39; # Required: true
Flex7:
& # 39; # type: webform_flexbox
bank:
& # 39; # type: select
& # 39; & # 39 # title ;:
& # 39; # options: banks_in_israel
& # 39; # Required: true
sniff_bank:
# Type #: text field
& # 39; # title & # 39 ;: יף
& # 39; # input_mask & # 39 ;: & # 39; 999 & # 39;
& # 39; # Required: true
Bank account:
# Type #: text field
& # 39; # title & # 39 ;: # ן ן ן ן
& # 39; # Required: true
hidden:
& # 39; # type: webform_flexbox
Dirug:
& # 39; # type: hidden
& # 39; # title & # 39 ;: רוג
& # 39; # default_value: & # 39; 50 & # 39;
Drwg:
& # 39; # type: hidden
& # 39; # title: & # 39; ור דירוג & # 39;
& # 39; # default_value: & # 39; ובד שעתי & # 39;
Darga:
& # 39; # type: hidden
& # 39; # title & # 39 ;: רגה
# Default_value: 0 & # 39;
tiur_darga:
& # 39; # type: hidden
& # 39; # title & # 39; יאור דרגה & # 39;
& # 39; # default_value & # 39 ;: י
    [css] => 
    [javascript] => 
    [handlers] => Table
(
)

    [handlersCollection] => 
    [elementsOriginal] => flexbox1:
& # 39; # type: webform_flexbox
fname:
# Type #: text field
& # 39; # title & # 39 ;: #רטי & # 39;
& # 39; # Required: true
lname:
# Type #: text field
& # 39; # title & # 39 ;: #ה & # 39;
& # 39; # Required: true
idno:
# Type #: text field
& # 39; # title & # 39 ;: ודת זהות & # 39;
& # 39; # description & # 39; ין כולל ספרת יקורת & # 39;
& # 39; # input_mask & # 39; 999999999 & # 39;
& # 39; # Required: true
flexbox2:
& # 39; # type: webform_flexbox
sex:
& # 39; # type: radios
& # 39; # title & # 39 ;: ין
& # 39; # options: myn
& # 39; # options_display: two_columns
birth date:
& # 39; # type & date :: date
& # 39; # title & # 39; ריך ידה & # 39;
& # 39; # flex: & # 39; 3 & # 39;
& # 39; # date_date_format & # 39;: yyyymmdd
& # 39; # date_date_element & # 39 ;: datepicker
family status:
& # 39; # type: select
& # 39; # title & # 39 ;: #י & # 39;
# Options #: family_state
& # 39; # Required: true
& # 39; # flex: & # 39; 3 & # 39;
Flex3:
& # 39; # type: webform_flexbox
nom_zug:
# Type #: text field
& # 39; # title & # 39; & הזוג & # 39;
zug_id:
# Type #: text field
& # 39; # title & # 39 ;: ודת זהות בן הזוג & # 39;
& # 39; # description & # 39; ין כולל ספרת יקורת & # 39;
& # 39; # input_mask & # 39; 999999999 & # 39;
& # 39; # Required: true
zug_bday:
& # 39; # type & date :: date
& # 39; # title: & # 39; ריך לידה בן הזוג & # 39;
& # 39; # date_date_format & # 39;: yyyymmdd
& # 39; # date_date_element & # 39 ;: datepicker
Flex4:
& # 39; # type: webform_flexbox
street:
# Type #: text field
& # 39; # title & # 39 ;: רחוב
house number:
# Type #: text field
& # 39; # title & # 39 ;: # ת ת ת ת
appartment_num:
# Type #: text field
& # 39; # title: & # 39; ר דירה & # 39;
FLEX5:
& # 39; # type: webform_flexbox
yswb:
& # 39; # type: select
& # 39; # title & # 39 ;: ישוב
& # 39; # options: yswb
myqwd:
# Type #: text field
& # 39; # title & # 39 ;: יקוד
# Size: 7 & # 39;
& # 39; # input_mask & # 39; 9999999 & # 39;
& # 39; # Required: true
E-mail:
& # 39; # type: email
& # 39; # title & # 39 ;: #וא"ל & # 39;
& # 39; # Required: true
flex6:
& # 39; # type: webform_flexbox
cellular:
# Type #: text field
& # 39; # title & # 39 ;: ולרי
& # 39; # input_mask & # 39 ;: & # 39; 0599999999 & # 39;
phone:
# Type #: text field
& # 39; # title & # 39 ;: ון בבית & # 39;
# Size: 10 & # 39;
# Input_mask # 0999999999 # input_mask
kupat_cholim:
& # 39; # type: select
& # 39; # title & # 39; ופת חולים & # 39;
& # 39; & # 39 # option ;:
2: ית
3: ומית
4: י
7: וחדת
& # 39; # Required: true
Flex7:
& # 39; # type: webform_flexbox
bank:
& # 39; # type: select
& # 39; & # 39 # title ;:
& # 39; # options: banks_in_israel
& # 39; # Required: true
sniff_bank:
# Type #: text field
& # 39; # title & # 39 ;: יף
& # 39; # input_mask & # 39 ;: & # 39; 999 & # 39;
& # 39; # Required: true
Bank account:
# Type #: text field
& # 39; # title & # 39 ;: # ן ן ן ן
& # 39; # Required: true
hidden:
& # 39; # type: webform_flexbox
Dirug:
& # 39; # type: hidden
& # 39; # title & # 39 ;: רוג
& # 39; # default_value: & # 39; 50 & # 39;
Drwg:
& # 39; # type: hidden
& # 39; # title: & # 39; ור דירוג & # 39;
& # 39; # default_value: & # 39; ובד שעתי & # 39;
Darga:
& # 39; # type: hidden
& # 39; # title & # 39 ;: רגה
# Default_value: 0 & # 39;
tiur_darga:
& # 39; # type: hidden
& # 39; # title & # 39; יאור דרגה & # 39;
& # 39; # default_value & # 39 ;: י
    [elementsDecoded] => 
    [elementsInitialized] => 
    [elementsDecodedAndFlattened] => 
    [elementsInitializedAndFlattened] => 
    [elementsInitializedFlattenedAndHasValue] => 
    [elementsTranslations] => 
    [elementsPrepopulate] => Table
(
)

    [elementsActions] => Table
(
)

    [elementsWizardPages] => Table
(
)

    [elementsManagedFiles] => Table
(
)

    [pages] => 
    [hasFlexboxLayout] => 
    [hasContainer] => 
    [hasConditions] => 
    [hasRequired] => 
    [hasTranslations] => 
    [hasMessagehandler] => 
    [originalId] => qyt_qlyth_mwrwt_mmnwt_wqdmyh_kyt
    [langcode] => he
    [third_party_settings] => Table
(
)

    [_core] => Table
(
)

    [trustedData] => 
    [entityTypeId] => web form
    [enforceIsNew] => 
    [typedData] => 
    [cacheContexts] => Table
(
            [0] => languages: language_interface
)

    [cacheTags] => Table
(
)

    [cacheMaxAge] => -1
    [_serviceIds] => Table
(
)

    [_entityStorages] => Table
(
)

    [dependencies] => Table
(
)

    [stringTranslation] =>
)

I have created activated a new module:
Here is what I have until now:

achva_general.module

<? php
use Drupal  Core  Form  FormStateInterface;

/ **
* Implements hook_webform_element_alter ().
*
* @param array $ element
* @param FormStateInterface $ form_state
* @param array $ context
* /
function achva_general_webform_element_alter (array and element $, FormStateInterface $ state_format, array $ context) {
// check the desired item
if (isset ($ element['#webform-submission-qyt-qlyth-mwrwt-mmnwt-wqdmyh-kyt-add-form'])) {
$ element['#element_validate'][]    = table (
& # 39; Drupal  custom_module  Validate  MyValidateConstraint & # 39;
& # 39; accept & # 39;
)
}
}

This is the file modules / custom / achva_general / src / Validate / MyValidateConstraint.php

getValue ($ webformKey);

// Ignore empty fields or single arrays (also called #multiple).
if ($ value === & # 39; || is_array ($ value)) {
echo $ value;
return;

}

echo 'no error';
// do a validation here ...
// and set an error variable, for example. $ error

if ($ error) {
if (isset ($ element['#title'])) {
$ tArgs = array (
& # 39;% name & # 39; => empty ($ element['#title'])? $ element['#parents'][0]    : $ element['#title'],
& # 39;% value & # 39; => $ Value,
)
$ formState-> setError (
$ element,
t (# value% is not allowed for item% name. Please use a different value., $ tArgs)
)
} other {
$ formState-> setError ($ element);
}
}
}
}

sql – Single column in multiple column with custom delimiter

I have a column where the data in a column as values
– Ahmad Ali / Lahore
– Ali N / A Talib r / o Makkah
– Noor N / A Ahmad r / o Karachi
– MacDonald Society
– ABC Bank
– Sara owner SA Traders

I want to separate into columns where n / a and r / o comes but in some lines it's possible that n / a and r / o do not occur then all the data in a single line

How to display custom data from the Drupal database in a view?

I'm working on creating a new website in Drupal 8 and I do not know how to reference custom table data in a view.

Specifically, I have a script that extracts data from an external database and inserts it into my Drupal database in custom tables. How can I allow Views to see this data?

In Drupal 7, I've already used the Forena module and the Data and Schema modules to achieve the same database and external references, but what I'm seeing is that the support for these three modules in Drupal 8 seems to be missing, which suggests to me that In D8, there is a better way to do it than everyone knows except me. 🙂

I'm not sure I'm not searching properly, but I'm unable to find a clear answer on how to get this feature in Drupal 8. Drupal 8 is so different and I'm not sure if I need to do it. be looking for a contributory module or if it's something I would code directly.

Hope someone can direct me in the right direction?

sharepoint designer – Custom List Column Validation in SP2013

I have encountered a small problem when I want to validate my fields (columns) in my custom list in Sharepoint 2013.

I give you an example:

I have a custom form made in Infopath with multiple fields and 2 date and time fields. We call it "StartDate" which never changes and the other is "EndDate" and this date changes. And when I have the form "createListItem", the validation "EndDate" must be "StartDate + 365days", which is quite easy to do. But when I need to edit an item from the list, I need another validation of "EndDate", this time "EndDate + 365days". Is it possible to do it without programming? I tried it using additional fields and calculated field types, but I was not able to get what I wanted.

No suggestion? Maybe someone here was trying to do the same thing.

Thank you in advance.

Custom message type does not appear in search results

I am working on a plugin where I add a custom article type and insert its articles according to the wp_insert_post function once the plugin is activated. The problem is that custom publication types can not appear in the search whatever I do.

I've tried to include the new custom publication type in the publication types to search through the pre_get_posts hook. I even checked it with the relevanssi plugin and made sure they were indexed and that the custom message type tables were printed and that it is already in the table. I've tried to insert it manually through the admin interface. I even tried the solution mentioned in this question and none of the above solutions worked:

https://stackoverflow.com/questions/36787961/wordpress-custom-post-type-not-showing-in-search-results

Here is my code regarding the registration of the custom message type:

                $ args = array (
& # 39; labels & # 39; => $ labels,
& # 39; supports & # 39; => array (& # 39; title & # 39 ;, & # 39; editor & # 39;),
& # 39; hierarchical & # 39; => false,
& # 39; public & # 39; => true,
& # 39; show_ui & # 39; => false,
& # 39; show_in_menu & # 39; => false,
& # 39; menu_position & # 39; => 5,
& # 39; show_in_admin_bar & # 39; => false,
& # 39; show_in_nav_menus & # 39; => false,
& # 39; can_export & # 39; => true,
& # 39; has_archive & # 39; => true,
& # 39; exclude_from_search & # 39; => false,
& # 39; public_queryable & # 39; => true,
& # 39; bility_type & # 39; => & # 39; post & # 39;
)
register_post_type (& # 39; taxarchive & # 39 ;, $ args);

This is the code to insert the posts:

$ taxonomies = $ wpdb-> get_results ("SELECT term_id, name FROM $ wpdb-> terms");
$ taxonomies_array = array ();
wp_defer_term_counting (true);
foreach ($ taxonomies as $ taxonomy) {
$ term = get_term ($ taxonomy-> term_id);
$ taxonomy = get_taxonomy ($ term-> taxonomy);
if (isset ($ term-> taxonomy) && $ taxonomy-> public_queryable) {
$ taxonomies_array[$taxonomy->name] = $ term-> taxonomy;
$ term_post = array (
& # 39; post_title & # 39; => $ term-> name,
& # 39; post_content & # 39; => $ term-> name,
& # 39; post_status & # 39; => & Quot; publish & quot;
& # 39; post_type & # 39; => & # 39; taxarchive & # 39;
)
if (post_exists ($ term-> name) == 0) {
wp_insert_post ($ term_post);
}

}
}

wp_defer_term_counting (false);

This is the code that adds the taxarchive publication type to the pre_get_posts hook:

                function add_post_type_to_search ($ query) {
if (is_admin () ||! $ query-> is_main_query ()) {
return;
}

$ args = array (
& # 39; exclude_from_search & # 39; => false,
)

$ post_types = get_post_types ($ args, names, & # 39; and & # 39;) &;
print_r ($ post_types);


$ query-> set (
& # 39; post_type & # 39 ;, array_values ​​($ post_types)
)
// print_r ($ query);

}
add_filter ('pre_get_posts', & # 39; add_post_type_to_search & # 39;);

I never receive any taxarchive publication in the search results when I search for any keyword. How can they be indexed in the results?

customization – Add a custom taxonomy slug to the URL of the custom message type

I have a custom message type named "blog" and a custom taxonomy named "zone" (both are configured using the CPT UI plug-in). I've also used the code below to add the taxonomy slug in the URL, so that standard WP POST has the URL structure:% area% /% post-title% / . What can I possibly add to the code below so that my CPT named "blog" also has the URL structure example.com/%Area%/blog/%post-title%/ if it is even possible? Otherwise, a structure of example.com/blog/%Area%/%post-title%/ would be nice too. P.S. taxonomy "area" is available both in the standard WP Blog and in the "blog" CPT.
Thank you guys!

add_filter (& # 39; post_link & # 39; area_permalink & # 39 ;, 10,3);
add_filter (& # 39; post_type_link & # 39; area & # 39 ;, 10, 3);

function area_permalink ($ permalink, $ post_id, $ leavename) {
if (strpos ($ permalink,% area%) === FALSE) returns $ permalink;

// Get a post
$ post = get_post ($ post_id);
if (! $ post) returns $ permalink;

// Get the taxonomy terms
$ terms = wp_get_object_terms ($ post-> ID, & quot; area & # 39;)
if (! is_wp_error ($ terms) &&! blank ($ terms) && is_object ($ terms[0])) $ taxonomy_slug = $ terms[0]slug;
else $ taxonomy_slug = & # 39; primary_area & # 39 ;;

return str_replace (% area%, $ taxonomy_slug, $ permalink);
}   

custom – How to add additional fields on the ccsave payment method?

I need to create two additional fields for the ccsave command form. I have created in the tables sales_flat_quote_payment and sales_flat_order_payment two fields called cc_parcelas and cc_csc.

In html, I put:

  • <label for = "_cc_csc "class =" required ">*__ (& # 39; CVV & # 39;)?>
    <type of entry = "text" title = "quoteEscape ($ this -> __ ('Name on the map')) ?? "" class = "input-text required-entry" id = "_cc_csc "name =" payment[cc_csc]"value ="escapeHtml ($ this-> getInfoData (& # 39; cc_csc & # 39;)) ?? "style =" width: 87%! important "/>
    getInfoData (& # 39; cc_csc & # 39;)?> <label for = "_parcelas "class =" required ">*__ (# of Parcelas)?>
    <select id = "_cc_parcelas "name =" payment[cc_parcelas]"class =" required-entry "style =" width: 100%! important "> <? php for ($ t = 1; $ t <= 10; $t++) { ?> <option value = "" selected = "selected">
  • Even by sending the fields in HTML and having created these fields in the tables mentioned, the information is not written in the database. What do I forget? I am new to the development of Magento.

    enter the description of the image here

    Custom HTML and CSS in SharePoint

    The short answer is yes, you can customize the page template and the long answer will be, your question is very subjective and may have multiple answers depending on the design you are trying to achieve.

    In classic SharePoint, we have the concept of Master pages and Layout to achieve the custom theme / branding. But in the case of modern pages SPO, from now on, the concept of SharePoint Lookbook, with which you can define the page, theme and presentation templates and pre-fill the page content. Learn more about SharePoint Lookbook.

    Not recommended

    This is not a recommended method, but if you want to hide all the chrome from SPO, you need to customize them with SPFx Application Customizer. You can use it to hide the SPO component in order to achieve your user interface and the SPFx Web Part to manage the content user interface. Learn more about the application customizer. The example of customization screen is as follows.

    enter the description of the image here