Can’t use is_home in template-functions.php
I havent tested yet but try using this, $url = “//{$_SERVER[‘HTTP_HOST’]}{$_SERVER[‘REQUEST_URI’]}”; if is same as “example.com”
I havent tested yet but try using this, $url = “//{$_SERVER[‘HTTP_HOST’]}{$_SERVER[‘REQUEST_URI’]}”; if is same as “example.com”
Following your comment, here’s how you can do: Education Hub use hook to display header, so you it is possible to override education_hub_action_header hook inside a plugin like that add a new php file in wp-content/plugins/ with following content: <?php /* Plugin Name: h1 in homepage logo for education hub Version: 1.0.0 */ add_action(‘init’, function(){ … Read more
If the url’s for both site is different, You can simply check if site is being viewed from mobile or not and than you can redirect to your second site if it is mobile… Here is one of code who detects whether it is mobile or not… http://detectmobilebrowsers.mobi/ You can use such code detect mobile … Read more
you can use the per_get_posts filter hook to change the order of the query something like: add_filter(‘pre_get_posts’, ‘filter_homepage_posts_order’); function filter_homepage_posts_order($query) { //only run is current page is home page if ($query->is_home) { $limit_number_of_posts = 5; //number of posts $featured_category_id = get_cat_id(‘Reviews’); // by cat name… $query->set(‘cat’, $featured_category_id); $query->set(‘posts_per_page’, $limit_number_of_posts); $query->set(‘order’,’DESC’) } return $query; }
http://codex.wordpress.org/Settings_Reading_Screen “Posts page – Select in the drop-down box the name of the Page that will now contain your Posts. If you do not select a Page here, your Posts will only be accessible via other navigation features such as category, calendar, or archive links. Even if the selected Page is Password protected, visitors will … Read more
It’s pretty easy to set whatever page you want as your homepage. The WP Codex has pretty detailed instructions on how you can do it. But basically you create two pages, one for your homepage and another page for your blog (or news or whatever else you want to call the dynamically generated content–or none … Read more
Hook it in from your child themes functions file or add the template tag to a front-page.php file Untested add_action(‘loop_end’,’disqus_front_page_after_loop’); function disqus_front_page_after_loop() { if (is_front_page() && function_exists( ‘comments_template’ ) ) { comments_template(); } } Change the loop_end hook to another WordPress or theme specific hook. If using the template tag, you might want to try … Read more
This is actually quite easy to do: You will need to install a geolacation plugin that provides methods/functions to identify visitor country. N.B. A plugin only providing shortcodes will not work. The only complicating factor is countries can be named in a variety of ways so 2 character ISO Country Codes have to be used … Read more
I think you should add a css class and in your loop, put a $i and let $i run, if $i == 2 then you add the css class attribute to that sticky post. $i = 0; while( have_posts() ): the_post(); $i++; if($i == 2): $css_class=”top-sticky”; else: $css_class=””; endif; endwhile; wp_reset_postdata();
Go to Dashboard -> Appearance -> Customize Click on “Theme Options” Now you can see your page sections that the second one is your first page that is repeated. Click on pencil icon at the top left of the unwanted section. Then on the list at the left you can see the name of your … Read more