Tag Info

New answers tagged

0

You need to check that you aren't already on the mobile site: function redirecting_to_mobile_site() { if ( $_SERVER['SERVER_NAME'] !== 'm.example.com' && wp_is_mobile() ) { wp_redirect( 'http://m.example.com' . $_SERVER['REQUEST_URI'], 301 ); exit; } } add_action( 'template_redirect', 'redirecting_to_mobile_site' ); You'll ...


0

@import is not good solution AFAIK it takes a bit more time to download @import link and then process it, so you gonna have a little bit of network bottleneck. I'd go with default style.css file where you have all wordpress required meta data and then renamed diginomics.com/css/style.css to gobal.css and linked it with absolute link. Such semantic naming is ...


0

If you're using an absolute reference like that, you'd want to include the full file path, like http://diginomics.com/wp-content/themes/THEMENAME/css/style.css I believe any time you call the functions like get_stylesheet_directory() or get_stylesheet_directory_uri() it will return the path for the current theme. Just keep in mind that all themes need a ...


0

I wrote an article a while ago on how to do this using Bit.ly and a custom url. http://craigmdennis.com/articles/set-up-a-custom-short-url-with-wordpress Buy a short URL Sign up for bit.ly Add an A Record to point to bit.ly and verify it Download & install bit.ly Service WordPress plugin Use <?php echo wp_get_shortlink(); ?> in your theme As ...


0

Here's a possibly simple solution, using an ancillary table, and user-defined short slugs: create a post_meta "short_slug" when creating a post, the link-name from your example on save_post, if (meta_key='short_slug' and is_a_valid(meta_value)) wpdb->insert into short_slugs_table slug,permalink , your index.php on your mgscr.com could then ...



Top 50 recent answers are included