skip to Main Content

Display Custom Posts in Custom Template in WordPress

Pretty stuck ! I made a custom post type for my WP back office : register_post_type('realisations',[ 'label' => 'RĂ©alisations', 'public' => true, 'menu_position' => 3, 'menu_icon' => 'dashicons-format-gallery', 'supports' => ['title', 'editor', 'thumbnail'], ]); and I want all the articles…

VIEW QUESTION

WordPress – How to echo a variable in Literals

is there a way in twig to echo a variable in literals, like this? {{ mb.get_the_post_thumbnail( post.ID, 'full', {'class': 'sec-mitarbeiter-image {{objectPositionClass}} '} ) }} Result: class="sec-mitarbeiter-image {{objectPositionClass}}" Expected: class="sec-mitarbeiter-image object-position-top"

VIEW QUESTION
Back To Top
Search