preg_replace specific Text to small latter strtolower [closed]

function emailleftappend($content){ $content = preg_replace_callback(‘/(?<=get\/)(.*?)-(.*?)(?=\/”>)/’, function ($m) { return sanitize_title($m[1]). ‘-‘. sanitize_title($m[2]); }, $content); return $content; } add_filter(‘the_content’, ’emailleftappend’); the above fixed the issue for me. another way is below. function emailleftappend($content){ $content = preg_replace_callback(‘/(?<=get\/)(.*?)-(.*?)(?=\/”>)/’, function ($m) { return slug($m[1]). ‘-‘. slug($m[2]); }, $content); return $content; } add_filter(‘the_content’, ’emailleftappend’); function slug($z){ $z = strtolower($z); $z … Read more

Getting URL of Resized Image

Due to increased security risks with on-the-fly resizing scripts, I would convert over to the_post_thumbnail() or get_the_post_thumbnail() functions. If your theme doesn’t have post-thumbnail support, add this to your functions.php file. add_theme_support(‘post-thumbnails’); This will help your load times dramatically.

Requires PHP version 5.3.0

You’re getting this because you’re running PHP 5.2 on your server. The plugin requires PHP 5.3. If it did not do this check, you would get an error when it tried to use a PHP 5.3 feature. I won’t recommend a plugin as that would be offtopic and result in the question being closed ( … Read more

Does functions.php apply to every page?

the if(is_front_page()) will check if front page is being viewed, then load your css and meta slider . Codex documention <?php add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); function my_theme_enqueue_styles() { # added if(is_front_page()) wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ ); } add_action( ‘init’, ‘child_theme_init’ ); function child_theme_init() { # added if(is_front_page()) add_action( ‘storefront_before_content’, ‘woa_add_full_slider’, 5); } function woa_add_full_slider() … Read more