Tag Info

New answers tagged

0

So in general there are two opinions on absolute versus relative URLs: use relative URLs because easier to move around use absolute URLs because easier to move around Confusing, yes. The argument boils down to that migrating things with relative URLs you don't need to change domain. The counter argument is that you might need to change levels or URLs and ...


0

Personally I wouldn't use it - I see no real advantage over using absolute href and src attributes in your theme, and you'll avoid breaking relative links within post content.


0

if they use the same plugins I see no problem. you can use up even as symbolic link, getting simpler to maintain and update


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 ...


0

It has not worked any of your answers but only adding a little thing, it worked! Here my code: function login_redirect( $redirect_to, $request, $user ){ if(isset($_REQUEST['redirect_to'])){ return $_REQUEST['redirect_to']; } return admin_url(); } add_filter( 'login_redirect', 'login_redirect', 10, 3 ); function restrict_access_if_logged_out(){ ...


0

Your issue is related to your use of feed, which is both a reserved keyword, and an existing URL rewrite. e.g. RSS feeds etc: example.com/feed/rss2 You need to change your rewrite rules to use something other than 'feed' in your URL. The same goes for any taxonomies or post types that try to call themselves 'feed'.


0

Please note that if you have lessons that are in multiple chapters you will create duplicate content. If you want an easy way to connect these post types you can use a free plugin called Post Connector: http://wordpress.org/plugins/post-connector/


0

Nilambar's comment solved this for me. "You can pass two values as comma separated in a single parameter events. And later parse value correctly in your page. – Nilambar" I use this to get posts with tag1 OR tag2: echo '<a href="'.esc_attr(add_query_arg( 'events', 'tag1,tag2')).'">Linkname</a>'; And to get all posts with tag1 AND ...


0

The login_redirect filter hook is a more complete and effective solution here. This way, you can offer different redirect paths for different levels of users, or maintain the redirect URL in the case of an error when logging in (i.e. Incorrect Password). function login_redirect( $redirect_to, $request, $user ){ if(isset($_REQUEST['redirect_to'])){ ...


0

The ../page/X structure ties to pagination, not to post names. I'm sure you could change them but I'm not sure how deep the effects of the change would be. Have you thought about an alternate solution? Name each post your chapter name Forward Chapter 1 Chapter 2 Add a plugin that adds previous / next navigation functionality each individual post. ...


0

Also, you can apply on your database something like: update wp_posts set post_content = replace(post_content, 'site.test.net/old_folder', 'site.test.net/new_folder' ); of course use carefully.


0

The HTTP headers are already sent when you are inside your redirect_to_local_110() function, so you risk the : Warning: Cannot modify header information - headers already sent by ... message. You can try and verify it within your function: function redirect_to_local_110() { if( headers_sent() ) { echo 'oh, headers are already sent, ...


0

The $location parameter was incorrect. Try this: function redirect_to_local_110(){ wp_redirect( home_url() ); exit; } function add_home_link() { add_menu_page( 'Course', 'Course', 'read', 'home', 'redirect_to_local_110', 'dashicons-welcome-learn-more'); } add_action( 'admin_menu', 'add_home_link', 1001 ); Or you could use this: function ...


0

Hi Mark Kaplun and toscho, thank you for replying. I've figured out the culprit, it was caused by W3 Total Cache Plugin setting. Under Browser Cache, I have to untick this: Prevent caching of objects after settings change The weird string before every links is then removed.


0

Why dont you use add_query_arg to get login url, $arr_params = array( 'foo' => 'bar', 'baz' => 'tiny' ); echo add_query_arg( $arr_params ,wp_login_url());


0

If you need to add query string arguments to permalinks, use the_permalink filter: function append_query_string( $url ) { return add_query_arg( 'id', 'something', $url ); } add_filter( 'the_permalink', 'append_query_string' );


0

There's no need to do it the way you mean. There are ways to host multiple SSL websites on a single domain both with Apache and Nginx, and it's much easier to implement than your idea. Check out these tutorials: https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-apache-on-ubuntu-12-04 ...


0

Sometimes i find wordpress can be quite finiky when it comes to referencing files within the plugin. Specifying a full path seems to fix the problem. Try replacing... market_admin/icon.png With... /wp-content/plugins/your-plugin-name-goes-here/your-file-name-goes-here.png



Top 50 recent answers are included