Gravity Forms merge tags in templates?

The ability to use Gravity Forms’ merge tags in your post content might be helpful to you here: http://gravitywiz.com/gravity-forms-post-content-merge-tags/ If you need more specific control, you can fetch an entry like so: $entry = GFAPI::get_entry( $entry_id ); And echo out a specific field’s value from that entry like so: echo $entry[1]; // replace “1” with … Read more

Template code to split a post and print a custom field?

I’d suggest doing it this way to avoid running into problems where you split within a sentence/paragraph. Try splitting on <p> – then put the first element (first paragraph) into <div class=”content-first-half”> and the rest (if any) into <div class=”content-second-half”> in your template. It should be something like this (assuming $content has the html for … Read more

using wp enqueue style to create a CSS file specifically for a page template

If “/styledtwentyfifteen” is your child directory then that’s included by get_stylesheet_directory_uri() (of which bloginfo(‘stylesheet_directory’) is an alias) so you should leave it out on registering: function register_more_stylesheets() { wp_register_style( ‘stylesheet_name’, get_stylesheet_directory_uri() . ‘/background-slider-template.css’ ); } Similarly with is_page_template() you only need the file name (relative to the template directory), and if you register a style … Read more

Choose either excerpt or the_content

You can try this. <?php if ( is_single() ) the_content(); else custom_excerpt(‘custom_index’); ?> in your post loop.It prints content if the post is single.php page otherwise custom_excerpt() data.

Limit posts when visited with mobile devices

Original answer: You could instead try using MobileESP by downloading https://raw.githubusercontent.com/ahand/mobileesp/master/PHP/mdetect.php to your theme directory and then: function change_limit_mobile( $query ) { if ( $query->is_main_query() ) { require get_stylesheet_directory() . ‘/mdetect.php’; $mdetect = new uagent_info; if ( $mdetect->DetectMobileLong() ) { set_query_var( ‘posts_per_page’, 10 ); } } } Update: the simplest thing is to use wp_is_mobile() … Read more

WordPress And High disk i/o

so i managed to figure out what the problem was, your inputs were all help full in pointing me in the right direction. so what was causing my high disk i/o was the php_cgi_maxrequest value which was set at 99999, so i increased the value to 200,000 in the disk i/o shot down drastically, and … Read more