Using Schema with `the_excerpt`
Not the best solution but this works fine: <?php remove_filter(‘the_excerpt’, ‘wpautop’); ?>
Not the best solution but this works fine: <?php remove_filter(‘the_excerpt’, ‘wpautop’); ?>
add_theme_support( ‘html5’, array( ‘gallery’ ) ); or with another arguments such as search-form, comment-form, comment-list and caption, its call as Theme Markup Added gallery and caption support was introduced since WordPress version 3.9. As of version 3.9 WordPress uses <figure> and <figcaption> elements, instead of the generic definition list markup to output galleries. More on … Read more
Please read the WordPress tutorial on using AJAX in plugins (you are basically adding a plugin to your theme if you need to use AJAX). There are two things I see right off the bat that need to be fixed before your proceed. Note what the tutorial says about the global variable ajaxurl. Also make … Read more
WordPress filters the markup used in post content as a security measure. This stops people inserting malicious javascript inside comments or posts. On a non-multisite install, administrators sometimes have the unfiltered html capability allowing them to bypass this, but this is a dangerous feature In particular, the wp_kses_post function replicates this functionality and maintains the … Read more
the_post_thumbnail() does not return the path of your image. Instead, it returns the complete HTML markup for that image. You can use this instead: $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) ); echo $image[0]; If you want a specific size you can pass an additional parameter: $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); echo $image[0]; … Read more
the_field echoes the output while htmlentities() expects the value to be returned. Try get_field instead: data-img=”<?php echo htmlentities(get_field(‘portfolio_galleries’)); ?>” UPDATE: Instead of adding this huge chunk of html for the slider to the data-attribute just add it after your image: <img src=”https://wordpress.stackexchange.com/questions/93587/<?php echo $large_image ?>” data-title=”<?php echo get_the_title(); ?>” data-description=”<?php the_content();?>” alt=”<?php echo get_the_title(); // … Read more
You would have to do the following to save the order data into the WordPress DB, Do a WordPress AJAX sending the data that you want to be stored in it. You can do it at every re-arrange event of the elements. Handle the AJAX call in PHP and either do an update_option() or an … Read more
Just FYI… WordPress 3.2 includes an updated TinyMCE which allows HTML5 tags. It’s still under development but is fairly stable if you want to take the risk of running it now. The alternative is to write any posts requiring the tag with the visual editor turned off. As long as you don’t turn the editor … Read more
There is a solution that came up recently that is growingly popular especially in the German speaking part of the net called the two-click-method. It loads the buttons only after the user has clicked a grayed out image of the button. This has the advantage of saving the privacy of your users as facebook and … Read more
Use this function rather than comment_form() function validate_comment_form(){ ob_start(); comment_form(); echo str_replace(‘<form’,'<form attribute=”value” ‘,ob_get_clean()); }