Custom Post Types Generator
This website has some super awesome wp generator tools. http://generatewp.com/ I used it to create a custom post type in a few minutes.
This website has some super awesome wp generator tools. http://generatewp.com/ I used it to create a custom post type in a few minutes.
You can use this text to make a short page title. <?php $thetitle = get_the_title(); /* or you can use $post->post_title; */ $getlength = strlen($thetitle); $thelength = 25; echo substr($thetitle, 0, $thelength); if ($getlength > $thelength) echo “…”; ?> Or you can do add this to your functions.php file. function max_title_length($title){ $max = 20; return substr( Read More…
It turns out that you can’t actually use the <!–more–> tag in pages. Instead, you can use the <!–nextpage–> if you make sure to use the <?php wp_link_pages(); ?> php snippet. Take a look at the documentation to modify it. http://codex.wordpress.org/Template_Tags/wp_link_pages
This is a really simple lightweight accordion. https://medium.com/web-design-tutorials/29b39ac24b38
The tutorial on the site has an easy and lite tutorial on jQuery Tabs. No Plugin required. http://inspirationalpixels.com/tutorials/creating-tabs-with-html-css-and-jquery
If you are moving your website to a different server and you want to check it before you point the dns you can use the host file override method. Essentially you just open your hosts file on your computer as the admin and point the desired url to the desired ip address. http://docs.telerik.com/fiddler/knowledgebase/hosts
This article is exactly what you need to exclude a category from the blog page. You just paste in the snippet into your functions.php file and viola. http://chriswiegman.com/2013/05/excluding-a-category-from-your-wordpress-homepage/ // Exclude category from homepage function my_exclude_category( $query ) { if ( $query->is_home ) { $query->set( ‘cat’, ‘-230’ ); } return $query; } add_filter( ‘pre_get_posts’, Read More…
Put this in your css file. html{-webkit-font-smoothing: antialiased;}
This is a jQuery snippet that will populate an input field with the html from a radio button label ///////////////////////////////////////////// // Get the html from the selected Event on the radio button and put it in the hidden field so we can access it in the pdf for the ticket ///////////////////////////////////////////// $(‘#input_1_1’).click(function(){ var selectedEvent Read More…
This is the code I used to prepopulate a hidden field in Gravity Forms so that i could send users to different pages depending on what was in the field. /* CHECK FOR EVENTS and populate HIDDEN FIELD pre submission*/add_filter( “gform_pre_submission_23”, “check_for_events”, 9 );function check_for_events( $form ){ $ip=$_SERVER[“REMOTE_ADDR”]; //print_r($ip); exit(); $event_check = geoCheckIP($ip); //print_r($event_check[‘town’]. ‘, Read More…