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

How to split the loop every 2 and 5 results? [closed]

Yes you can do that using $wp_query->current_post inside the loop. It returns the current posts index number inside the loop (starting form 0). Have a look at the following code block <?php global $wp_query; while(have_posts()){ the_post(); the_title(); //do your other stuff if($wp_query->current_post==1){ //do what you want to do after 2nd post }else if($wp_query->current_post==5){ //do what … Read more

Split database on large site?

I had a similar issue on a website with ~100k rows in wp_posts and ~500k in wp_postmeta. Truth is WordPress have some really slow queries in the admin when you start to have a lot of posts. The best way to find the bottleneck is to use the Debug Bar plugin. You will probably find … Read more

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