ShortCode and extra

I discover that it’s a know bug, and will be fix in future release Reference here So then, i used this code… not pretty, but do the magic !, thanks $content = do_shortcode( shortcode_unautop( $content ) ); if ( ‘</p>’ == substr( $content, 0, 4 ) and ‘<p>’ == substr( $content, strlen( $content ) – … Read more

Play Video on Homepage Only

querySelector() returns null if no matches are found, so wrap the code that depends on imagineVideo in a conditional statement. var imagineVideo = document.querySelector(‘.page-id-36 .et_pb_video_box video’); if ( imagineVideo ) { imagineVideo.play(); imagineVideo.loop = true; imagineVideo.controls = false; } If you only want this code to be loaded on the homepage, you can put it … Read more

raw code vs wordpress

I think your question conflates design and development, though they’re not even close to the same thing. Sites are rarely “designed from code”…they’re designed in Photoshop by designers and translated into code by developers (of course, there are exceptions to this, but it’s usually the case). But I’ll assume you’re just saying, “since WordPress does … Read more

How to display recent posts on home page with custom HTML

<div id=”posts”> <?php // define query arguments $args = array( ‘posts_per_page’ => 8, // your ‘x’ goes here ‘nopaging’ = true // possibly more arguments here ); // set up new query $tyler_query = new WP_Query( $args ); // loop through found posts while ( $tyler_query->have_posts() ) : $tyler_query->the_post(); echo ‘<section class=”post”>’. ‘<h2><a href=”‘. get_permalink(). … Read more