Author:
erics , November 19th, 2019
All credit to Graham Walters for this excellent plugin and post, upon which this post is based – thank you, sir! https://grahamwalters.me/lab/disable-wpautop-on-specific-postspages/ Recently, a client was having problems using a plugin called by a shortcode. As it turned out, the JavaScript embedded in the returned content was being broken by the WordPress auto-paragraph feature known […]
Categories: How-To's , Technology Tags: add_filter , Auto-Paragraph , autop , Disable , Filter , howto , Page , POST , Prevent , remove_filter , Stop , tips , turn off , WordPress , wpautop
| No comments
Author:
erics , June 15th, 2018
remove_filter( ‘the_content’, ‘wpautop’ ); add_filter( ‘the_content’, ‘smart_autop’ ); function smart_autop($content) { $post = get_post(); if($post->post_type != ‘post’) return $content; // if not a post, leave $content untouched return wpautop($content); }
Categories: How-To's , Technology Tags: add_filter , autop , Disable , howto , para , POST , remove_filter , tips , WordPress , wpautop
| No comments
Author:
erics , October 21st, 2017
wordpress/wp-content/themes/yourTheme/single-yourCPTslug.php
add_action ( 'genesis_before_entry_content' , 'display_custom_fields' ) ;
function display_custom_fields ( ) {
$ jobTitle = get_field ( '_jobTitle' ) ? : '-' ;
print <<< EOT
< br style = "clear:both" / >
< p > Job Title : $ jobTitle < / p >
EOT ;
}
// Genesis Loop
genesis ( ) ;
Categories: How-To's , Technology Tags: add_action , cpt , Custom , custom post type , genesis , genesis_before_entry_content , howto , Loop , meta , POST , post type , Single , Theme , tips , WordPress
| No comments
Author:
erics , January 24th, 2016
add_action ( 'genesis_entry_content' , 'featured_post_image' , 8 ) ;
function featured_post_image ( ) {
$ categories = get_the_category ( ) ;
foreach ( $ categories as $ category ) {
// You can use slug, ID or any other identifier from the WP_Object
//if ($category->term_id == 288) {
if ( $ category -> slug == 'your-slug-here' ) {
print '<div id="sub-header-image">' ;
the_post_thumbnail ( 'post-image' ) ;
print '</div>' ;
}
}
return ;
}
Categories: How-To's , Technology Tags: Categories , Category , howto , POST , Single , Slug , tips , WordPress
| No comments
Author:
erics , September 23rd, 2011
var Params = jQuery . param ( {
'pagenum' : 16 ,
'pageqty' : 10 ,
} ) + '&' + jQuery ( '#yourForm' ) . serialize ( ) ;
Categories: How-To's , Technology Tags: GET , howto , javascript , JQuery , param , params , POST , Serialize , tips
| No comments