Video Shortcode Only Returning a Link
WordPress has this little minimally documented function, wp_video_shortcode() Just pass an array with the necessary information as if you were writing out the shortcode.
WordPress has this little minimally documented function, wp_video_shortcode() Just pass an array with the necessary information as if you were writing out the shortcode.
To add to the answers in the comments from RH, I found this in the codex (it’s kind of burried deep): Shortcode attribute names are always converted to lowercase before they are passed into the handler function. Values are untouched. This is from: http://codex.wordpress.org/Function_Reference/add_shortcode#Parameters
Can be useful do_shortcode function? http://codex.wordpress.org/Function_Reference/do_shortcode
depend on your code if you use it as gallery shortcode i think this will work : <div class=”gallery-content”> <?php if( has_shortcode( $post->post_content, ‘gallery’ ) ) : if ($ids != ”) { $images = explode(‘,’, $ids); } else { $images = get_children(array(‘post_parent’ => get_the_ID(),’post_type’ => ‘attachment’,’post_mime_type’ => ‘image’, ‘orderby’ => ‘menu_order_ID’)) } if ($images) : … Read more
Here is the solution I come up with after 30 minutes researching: function wpse_175564() { // The html goodies with shortcodes $htmlcodes=”<div class=”akismet_activate”> <div class=”aa_a”>A</div> <div onclick=”document.akismet_activate.submit();” class=”aa_button_container”> [the_shortcode id=”4″] <div class=”aa_button_border”> <div class=”aa_button”>Activate your Akismet account</div> </div> </div> <div class=”aa_description”><strong>Almost done</strong> – [the_shortcode id=”4″] activate your account and say goodbye to comment spam</div> </div>”; … Read more
The images URL are direct. They are not part of WP rewrite system, they are not stored as explicit metadata, they are never used for reverse lookups in core. It is possible to make fair attempt at reversing URL, see Turn a URL into an Attachment / Post ID. But it’s not a normal workflow … Read more
Because I was trying to make the redirect happen using shortcode in the registration and I didn’t get the answer which can delay the redirect until I add custom textarea fields date to user profile page before this step $userID = wp_insert_user( $userDataArr ) , I have no user ID yet, so I can’t do … Read more
WordPress core playlist function not showing artist and album info
Put this in your theme’s functions.php, it will add the shortcode [child_pages]: function wpsc_child_pages($atts){ global $wp_query; $html=””; if( empty($wp_query->post->post_parent) ) { $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } $pages = wp_list_pages(“title_li=&child_of=$parent&echo=0”); if( $pages ){ $html .= “<div><ul>$pages</ul></div>”; } return $html; } add_shortcode(‘child_pages’, ‘wpsc_child_pages’); If you want to pass the function variables (e.g. … Read more
Custom Login in Shortcode got error