Portable Post Links

WordPress is strongly opinionated about using absolute URLs. Doesn’t mean it’s better but it’s a choice is makes. The common way to handle it is replace as necessary in database. Please note that if you run replacement on all of database it is extremely important to use serialize–aware tool, or you risk corrupting the data.

Uploading Images in the Link Manager

Well, started as a curiosity, ended up doing a plugin… : After finishing, I went to look in WordPress repository and…yes, there’s already one that does it: Easy Blogroll Image : At least, I took a different approach and did something different. Featured Link Image – [edit: released in the WordPress repository, link updated]

How to generate expiring URL?

Ok I came up with this add_action( ‘wp_loaded’, ‘my_create_questionnaire_link’); function my_create_questionnaire_link(){ // this check is for demo, if you go to http://yoursite.demo/?create-my-link, you will get your unique url added to your content if( isset( $_GET[‘create-my-link’] ) ){ // This filter is for demo purpose // You might want to create a button or a special … Read more

Removing link ” from ” menu for some “links” without JS

Assuming you’re using wp_nav_menu() to display your navigation you could apply a walker that looks for css classes: $items_wrap = ‘<nav class=”…”>’; $items_wrap .= ‘<ul id=”%1$s” class=”%2$s”>%3$s</ul>’; $items_wrap .= ‘</nav>’; wp_nav_menu( array( ‘container’ => false, ‘container_class’ => false, ‘menu_class’ => ‘…’, ‘echo’ => true, ‘before’ => ”, ‘after’ => ”, ‘link_before’ => ”, ‘link_after’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)