Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
197 views

How to reuse page queries in custom gutenberg blocks or shortcodes?

I'd like to solve this problem, but not sure if it's even possible... Say I've got a page which on header shows some terms, so I start retrieving them: $children_terms = get_terms(array( '...
Luca Reghellin's user avatar
2 votes
2 answers
3k views

Wordpress: Query Loop Block – display custom metadata from Custom Post Types

I created a Custom Post Type and can use the the Query Loop Block from Wordpress to display these posts just fine. But I have some trouble pulling metadata from these Custom Post Types into the Query ...
zeug's user avatar
  • 321
2 votes
1 answer
3k views

How do I create a shortcode for a WordPress sidebar?

I have added a custom sidebar to my WordPress installation using the following script that also creates a shortcode: // Register Sidebars function custom_sidebars() { $args = array( 'id' ...
Mark Lee's user avatar
  • 315
0 votes
1 answer
2k views

How to create a Gutenberg shortcode block where I can put content directly inside the editor

I have the following shortcode: function shortcode_gray_content( $atts, $content = null ) { $content = clean_shortcode_content($content); return '<div class="gray-bg"><div class="...
Subrata Sarkar's user avatar