Shortcode content does not show in feed discription/excerpt

Ok I had to write my own custom excerpt like such: function custom_excerpt($text=””) { $raw_excerpt = $text; if ( ” == $text ) { $text = get_the_content(”); // $text = strip_shortcodes( $text ); $text = do_shortcode( $text ); $text = apply_filters(‘the_content’, $text); $text = str_replace(‘]]>’, ‘]]>’, $text); $excerpt_length = apply_filters(‘excerpt_length’, 200); $excerpt_more = apply_filters(‘excerpt_more’, ‘ … Read more

Getting a div content of a post in wordpress?

Using DOMDocument and DOMXPath you could try this. <?php while (have_posts()) : the_post(); ob_start(); // run the_content() through the Output Buffer the_content(); $html = ob_get_clean(); // Store the formatted HTML $content = new DomDocument(); // Create a new DOMDocument Object to work with our HTML $content->loadHTML( $html ); // Load the $html into the new … Read more

How I can get image description/title/alt for gallery image?

You need to get the metadata of each image, add this to your functions.php file: function get_post_gallery_images_with_info($postvar = NULL) { if(!isset($postvar)){ global $post; $postvar = $post;//if the param wasnt sent } $post_content = $postvar->post_content; preg_match(‘/\[gallery.*ids=.(.*).\]/’, $post_content, $ids); $images_id = explode(“,”, $ids[1]); //we get the list of IDs of the gallery as an Array $image_gallery_with_info = … Read more

Admin Filter – Add Post Type Description on Post Type Page

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it’s a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ($post_type->description) { printf(‘<h4>%s</h4>’, esc_html($post_type->description)); // echo } return $views; // … Read more

Remove the category/taxonomy description field?

When no hook is available, you can always count on the old jQuery trickery… add_action( ‘admin_footer-edit-tags.php’, ‘wpse_56569_remove_cat_tag_description’ ); function wpse_56569_remove_cat_tag_description(){ global $current_screen; switch ( $current_screen->id ) { case ‘edit-category’: // WE ARE AT /wp-admin/edit-tags.php?taxonomy=category // OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post break; case ‘edit-post_tag’: // WE ARE AT /wp-admin/edit-tags.php?taxonomy=post_tag // OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=3&post_type=post break; } ?> <script type=”text/javascript”> … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedueduedusedusedusedusedu