5

The main issue in your code is with these two attributes which use the exact same selector (the first span element in your block content): checkListItemOne: { type: 'string', source: 'html', selector: 'span' // same as below }, checkListItemTwo: { type: 'string', source: 'html', selector: 'span' // same as above } Which means the ...


3

Ok - so, firstly you should know that it is a variable and not a function - in php this is indicated by the dollar symbol before the name: $variable as opposed to function() Second, you should note that $hook is passed as a parameter to the function block - like so: function_name( $hook ){ // this makes the variable $hook available inside the function - ...


2

run only on posts listed under one category I highlighted that "posts" because if so, then the conditional tag you should use is in_category() and not is_category() which is for category archive pages (e.g. example.com/category/foo) — so for example, is_category( 93 ) checks if the current archive page is for the category (with the ID of) 93, ...


1

The main problems with what you've got are tha your close bracket } for the is_product() case is in the wrong place: it should be before the elseif not at the bottom of the block. (This is what Tom meant by indenting your code correctly: if you'd indented each {...}, which your IDE will do for you, this would have been obvious.) this code, defining the ...


1

I want the URLs of the nav-items to be replaced with # You can use the nav_menu_link_attributes hook to set the custom href value like so: add_filter( 'nav_menu_link_attributes', function ( $atts, $item, $args ) { if ( 'menu-categorias' === $args->theme_location && 'category' === $item->object ) { $atts['href'] = '#' . ...


1

This is an example how to add some OG tags for Facebook: Create a hook to a function on the wp_head action, // if on a single post screen, generate and insert facebook:OG tags. ## add_action( 'wp_head', 'wpse381199_og_tags', 12 ); Then create a function to generate the OG tags function wpse381199_og_tags(){ // get the current post ...


1

You need to define the HTTP Response code in wp_die function. wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!'), '', 404 );


1

As of WordPress version 5.6, any posts or pages has options on the editor to include any custom scripts/styles and meta tags to the header of the page. So if you put your <link rel"icon" href="favicon.png"/> it should work. You upload your favicon into the media and after you uploaded the media. Refer the uploaded favicon png image ...


Only top voted, non community-wiki answers of a minimum length are eligible