Create logout link in WordPress Rumi, January 11, 2011 To create your own proper WordPress logout (or sign out) link, you need PHP. PHP Default usage <a href="<?php echo wp_logout_url(); ?>" title="Logout">Logout</a> Logout and Redirect to Current Page <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Logout</a> Logout and Redirect to Homepage <a href="<?php echo wp_logout_url( get_bloginfo('url') ); ?>" title="Logout">Logout</a> See http://codex.wordpress.org/Function_Reference/wp_logout_url Plain HTML If you are in an iframe, you can use this hack to read the href <a id="my_signout" href="/wp-login.php?action=logout" target="_top">Sign out</a> <script type="text/javascript">if (-1 < parent.document.body.innerHTML.search(/href="([^"]+)" title="Log out/)) document.getElementById('my_signout').href=RegExp.$1.replace(/&/g, '&');</script> "Sign out" link in menu To add "Sign out" into the menu, add to footer.php // replace with your "Sign out" menu id var ae, e = document.getElementById('menu-item-722'); if (e) { ae = e.getElementsByTagName('a'); if (ae) { e = ae[0]; if (e) { e.href = '<?php echo wp_logout_url(); ?>'.replace(/&/g, '&'); } } } Related Scripts
Send HTTP requests using cURL June 6, 2014 Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1 -XPUT Sending data with a request: curl http://example.com/users -d"first_name=Bruce&last_name=Wayne" If you use -d and do not set an HTTP request method it automatically defaults to POST. Performing basic authentication: curl http://user:password@example.com/users/1 All together… Read More
EOT তৈরির কৌশল April 16, 2010April 6, 2013 আমি অনেকদিন থেকেই এটি অনুভব করছিলাম যে, EOT তৈরির ধাপগুলি সঠিকভাবে বর্ণনা করে একটি লেখা তৈরি করবো। আমি দেখেছি অনেকেই সমস্যায় পড়েন। বুঝতে পারেন না কিভাবে এগোবেন। EOT তৈরি করতে পারলেও দেখা যায় তার পারফরমেন্স ভালো না। বুঝতে পারেন না কোথায় সমস্যা হয়েছিলো। আর এই চিন্তা থেকেই এই লেখাটি শুরু… Read More
Sticky header and footer CSS July 24, 2013 HTML Code- <!– BEGIN: Sticky Header –> <div id="header_container"> <div id="header"> Header Content </div> </div> <!– END: Sticky Header –> <!– BEGIN: Page Content –> <div id="container"> <div id="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sit amet ipsum magna, et convallis sem. Nunc pulvinar magna vitae orci… Read More