onSplit not create my custom block

In my case, the block split now but it will create a new “core/paragraph” instead of my “studio-wai/paragraph” <RichText identifier=”content” tagName={BlockTag} {…blockProps} value={content} onChange={(newContent) => setAttributes({ content: newContent })} onMerge={mergeBlocks} onReplace={onReplace} onRemove={onRemove} placeholder={placeholder || __(‘Type / to choose a block’)} data-custom-placeholder={placeholder ? true : undefined} /> I created some console.log in the use-enter.js /** * … Read more

Help with creating a menu with multiple columns

the following code should help and I have added comments for explanation: .site-nav ul ul { z-index: 1000000; position: absolute; top: -9999999px; left: 0; /* Align with the left edge of the parent */ transform: none; /* Cancel the centering transform */ opacity: 0; background: #3498db; text-align: left; columns: auto; /* Remove multi-column layout */ … Read more

Custom WordPress Customizer Control for Typography Presets renders blank section or fallback , despite correct class registration

If your custom control’s render_content() is not being called, the most likely cause is either a PHP error preventing the class from being loaded, or the file is not being included at all. Double-check your file paths and logs. Otherwise, your approach is solid and follows best practices for custom controls in the WordPress Customizer. … Read more

change read more text in archive page depending on post category

With the online php generator I’ve created this code snippet. $post_categories = get_the_category($post->ID); $parent_category_name=””; if (!empty($post_categories)) { $parent_category = $post_categories[0]->parent ? get_category($post_categories[0]->parent) : $post_categories[0]; $parent_category_name = $parent_category->name; } if ($parent_category_name === ‘Apple’ || $parent_category_name === ‘Strawberry’) { echo “<span>Apples &amp; Strawberries</span>”; } else { echo “<span>Fruits</span>”; } It really works fine for me.

Output parent/child categories and posts in that parent/child hierarchy

You’re right that we need to handle parent-child relationships differently. Let me explain the approach and then show you the code changes needed. The key is to: First get only top-level categories (parent = 0) For each top-level category, check for child categories Display the hierarchy properly in the accordion <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js”></script> <link rel=”stylesheet” href=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.css”> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)