get_post_class() not working well
You create that string with $classes[] = $teaser_column . ‘ teaser’; Use the following instead: $classes[] = $teaser_column; $classes[] = ‘teaser’;
You create that string with $classes[] = $teaser_column . ‘ teaser’; Use the following instead: $classes[] = $teaser_column; $classes[] = ‘teaser’;
A php error is causing the white page. Use FTP to replace the functions.php file with a fresh, unedited copy. See Filezilla and FTP Clients « WordPress Codex Or use your web host’s file manager in your control panel. Next time, keep copies of files and edit via FTP rather than the WordPress theme editor.
the_content_rss() is deprecated. You should be using the_content_feed(), but that is a secondary problem. Both functions echo content. What you want is the get_* variant– get_the_content_feed(). That is a general rule, by the way, but not a 100% consistent one. Many functions starting with the_ will output content immediately and there tends to be a … Read more
I often use template_redirect. You can also try wp. List of WP Actions
You should deregister it. Add this function into your functions.php: add_action( ‘wp_enqueue_scripts’, ‘disqus_scripts’ ); function disqus_scripts() { if(is_front_page()) { wp_deregister_script(‘disqus_count’); } }
Working code for you: // Set any Custom Post Type to be displayed on the archive.php and tag.php function category_tag_archives($wp_query) { if ($wp_query->get(‘category_name’) || $wp_query->get(‘cat’) || $wp_query->get(‘tag’)) { $wp_query->set(‘post_type’, ‘any’); } } add_action(‘pre_get_posts’, ‘category_tag_archives’);
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
You need to use two underscores __(‘String to be translated’, ‘textdomain’) Also, it looks like you’re not using the textdomain in the right way
You really shouldn’t be doing this. Functions belong in the functions file. Period. (Or perhaps in a separate functions file which you include in the main one) However, if you insist, you can drop functions in any template file you want, because PHP doesn’t care. Actually you will need to include it in every template … Read more
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