Influence of WordPress functions on site speed

Functions and includes (itself) don’t affect the site performance much. But… The code inside a function can affect site speed. It all depends what exactly that function does. For example function esc_attr won’t affect site speed, because its code is simple and will run fast. On the other hand, functions like get_posts can take a … Read more

wp-admin page is blank

Have you tried changing your function names? The main one that would concern me as potentially having overlap is name(). If I’m doing a theme for myself, usually I’ll use my_ as the prefix for everything, otherwise I’ll use a unique identifier based on the name of the theme.

Modify search function in WordPress (TwentyTwelve)

Modify the searchform.php, or create one in a child theme (recommended), and you should be able to modify the form all you want. This is the file that get_search_form looks for and is the file used by the default search widget, though it is not listed in the Template Hierarchy. Reference: http://codex.wordpress.org/Function_Reference/get_search_form

In WooCommerce I need to modify the thankyou.php page [closed]

I ended up inserting the payment description. (the one you specify in the woocommerce settings in the WordPress backend) The “native” build-in woocommerce payment-text is static and doesn’t relates to the actual selected payment method. 🙁 I did this by modifying the woocommerce template file: 1: Copy this template file: ..wp-content/plugins/woocommerce/templates/checkout/thankyou.php to your-theme-folder/woocommerce/checkout/thankyou.php 2: Replace … Read more

Create Custom URL structure for specific Post category

Try these steps: Step #1: Replace this: add_action(‘generate_rewrite_rules’, ‘custom_rewrite_rules’); function custom_rewrite_rules( $wp_rewrite ) { $regex = ‘/[\s\S]/’; $new_rules = array( trailingslashit(‘testimonials/’.$regex) => ‘/?p=’. get_page_by_path(‘$matches[1]’, OBJECT, ‘post’)->id ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; return $wp_rewrite; } ..with this one: add_action( ‘init’, ‘custom_rewrite_rules’ ); function custom_rewrite_rules() { add_rewrite_rule( ‘testimonials/([^/]+)(?:/([0-9]+))?/?$’, ‘index.php?category_name=testimonials&name=$matches[1]&page=$matches[2]’, ‘top’ // The rule position; either ‘top’ … Read more