Wie fügt man dem Mauerwerk einen leeren Eintrag hinzu?

Ich benutze Mauerwerk js Bibliothek für Display-Beiträge in meiner wp-Installation. Das Problem dabei ist, dass Sie zwischen Posteinträgen eigentlich nichts hinzufügen können, da die absolute Positionierung verwendet wird. Also sollte ich entweder js verwenden, um in den Block zu hacken, um den gewünschten Block hinzuzufügen, oder ich kann wp categories / tags loop anpassen (wo ich es brauche), um einen leeren Eintrag hinzuzufügen, den ich als Platzhalter verwenden kann es mit CSS.

Wie kann ich der Kategorie und der Tag-Schleife einen leeren Eintrag hinzufügen? In meinem Fall muss ich den leeren Eintrag voraus haben, also sollte es so sein: – zuerst der leere Eintrag – dann wird die normale Schleife fortgesetzt

Wie es geht?

add_action( 'wp_enqueue_scripts', 'sk_masonry_script' ); //* Add custom body class to the head add_filter( 'body_class', 'sk_body_class' ); function sk_body_class( $classes ) { if (is_home()||is_archive()) $classes[] = 'masonry-page'; return $classes; } //* Display Post thumbnail, Post title, Post content/excerpt, Post info and Post meta in masonry brick add_action('genesis_meta','sk_masonry_layout'); function sk_masonry_layout() { if (is_home()||is_archive()) { //add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); add_action( 'genesis_entry_content', 'sk_masonry_block_post_image', 8 ) ; add_action( 'genesis_entry_content', 'sk_masonry_title_content', 9 ); add_action( 'genesis_entry_footer', 'sk_masonry_entry_footer' ); remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); add_action( 'genesis_before_content', 'genesis_do_breadcrumbs' ); remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); add_action( 'genesis_before_content', 'genesis_do_taxonomy_title_description', 15 ); remove_action( 'genesis_before_loop', 'genesis_do_author_title_description', 15 ); add_action( 'genesis_before_content', 'genesis_do_author_title_description', 15 ); remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 ); add_action( 'genesis_before_content', 'genesis_do_author_box_archive', 15 ); remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); add_action( 'genesis_before_content', 'genesis_do_cpt_archive_title_description' ); remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' ); add_action( 'genesis_after_content', 'genesis_posts_nav' ); } } //* Helper function to display Post title and Post content/excerpt wrapped in a custom div function sk_masonry_title_content() { echo '
'; genesis_do_post_title(); genesis_do_post_content(); echo '
'; } //* Helper function to display Post info and Post meta function sk_masonry_entry_footer() { genesis_post_info(); genesis_post_meta(); } //* Set the second parameter to width of your masonry brick (.home .entry, .archive .entry) add_image_size( 'masonry-brick-image', 255, 0, TRUE ); //* Helper function to display featured image //* Source: http://surefirewebservices.com/development/genesis-framework/using-the-genesis-featured-image function sk_masonry_block_post_image() { $img = genesis_get_image( array( 'format' => 'html', 'size' => 'masonry-brick-image', 'attr' => array( 'class' => 'post-image' ) ) ); printf( 'https://wordpress.stackexchange.com/questions/142768/how-to-add-an-empty-entry-to-masonry/%s', get_permalink(), the_title_attribute( 'echo=0' ), $img ); } //* Add more link when using excerpts function sk_excerpt_more($more) { return '  [Continue Reading]'; } add_filter('excerpt_more', 'sk_excerpt_more'); //* Modify the length of post excerpts add_filter( 'excerpt_length', 'sk_excerpt_length' ); function sk_excerpt_length( $length ) { return 33; // pull first 10 words }

Solutions Collecting From Web of "Wie fügt man dem Mauerwerk einen leeren Eintrag hinzu?"