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

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

with PHP within splits the link

What you are doing isn’t ever going to work the way you want. the_terms() is going to produce a list of complete a tags so you can’t nest or merge it with another one like you are trying to do. And there are no convenient arguments or filters that would allow you to alter that … Read more

Splitting the_content() by size?

The function assumes wpautop filter on the_content is sitting at priority 10, where WP adds it. If, for any reason, it has been moved at another priority, the filter below should be adjusted to happen after wpautop. The function filters the_content if we are in frontend and we are on a singular post/page (feel free … Read more