Hide WordPress header image on specific URL

Objective: Hide WordPress header image on specific URL

Target URL: All URL except http://hilmanali.com/blog/

Theme: Sorbet (child)

File name: header.php

Original code:

<body <?php body_class(); ?>>

Modified code:

<body <?php body_class(); ?>>
<?php
global $wp;
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
$is_specific_network = stripos( $current_url, 'http://hilmanali.com/blog/page/' );
?>

Screenshots:

2016-11-07_22_48_26

2016-11-07_22_49_05

2016-11-07_22_49_17

 

Selamat Tinggal Flickrit

Tak sampai setahun gunakan Flickrit, akhirnya mereka akan menghentikan servis sedia ada dan akan memperkenalkan servis yang baharu.

Berikut adalah dua jenis account yang akan diperkenalkan

Flickrit Free Account features

  • Limited to 50 Images Per Slideshow
  • Limited to 5000 Views/Day Bandwidth
  • Limited to 5 Slideshows
  • 5 Different Themes & Layouts
  • Basic Analytics

Flickrit Pro Account features (USD 4.99/m or USD 39.99/y)

  • Up to 250 Images Per Slideshow
  • Unlimited Views & Bandwidth
  • Unlimited Slideshows
  • Over 15 Different Themes & Layouts
  • Full Analytics and Reports (see who’s viewing, by location and more!)

Memandangkan harga yang boleh dikatakan mahal, dan mungkin juga method (DIV in body + SCRIPT before body) yang diberi tak boleh diguna pakai dalam WordPress, maka Abah telah menghentikan penggunaan servis mereka serta merta. Semua Flickr album/slideshow dalam post blog telah ditukar kepada direct URL. Kebetulan, WordPress akan convert direct URL kepada slideshow. Ok lah tu 🙂

Download all media from WordPress blog

A simple tutorial how to download all media from WordPress blog. The reason I use this method is because, I wanted to transfer all the media specifically from XXX.files.wordpress.com domain into my other web host. And due to limitation of free account users, I couldn’t access the media files by using any third party file manager such as FTP.

What we need:

Steps:

1) Login to your WordPress.com account and export “All content” (My Sites > WP Admin > Tools > Export) — Save the exported file to a location where you can find it, easily

2) Rename the saved XML file (usually <your_name>.wordpress.<date>.xml) to HTML extension (e.g: <your_name>.wordpress.<date>.html) — If there is a rename warning prompted, just click Yes

3) Open the renamed HTML file with Mozilla Firefox (Don’t panic with the content :-)), right click inside the opened file and choose DownThemAll! from menu

4) At DownThemAll! – Make Your Selection screen, do the following:

  • Click on Links tab
  • Save Files in: Locate your desired directory to save
  • Renaming Mask: *subdirs**name*.*ext*
  • Fast Filtering: https://<your_subdomain_name>.files.wordpress.com
  • Click Start!
  • Sit back and relax 🙂

Post content without featured image header

Baru tambah template baru, “post content without featured image header” di mana semua post yang ada featured image takkan mempunyai header bila post dibaca.

Tujuan utama, supaya senang untuk export posts dari sini ke blog https://darwisy.wordpress.com

Seperti sedia maklum, plugin tidak boleh ditambah bagi pengguna free account di wordpress.com. Memandangkan kebanyakan featured image dalam blog ini menggunakan image dari host luar (Nelio External Featured Image), maka ini adalah langkah yang boleh dikatakan praktikal untuk display semua featured image di dalam post content.

Selain dari itu, ia juga dapat mengelakkan gambar berulang (repeating image) sekiranya masih mahu display gambar di header dan dalam content.

Tambahan, juga amat berguna sekiranya ingin menukar kepada theme yang tidak support featured image. Atau, export ke blog yang tidak support featured image. Logik: semua featured image akan berada dalam post content dan bukan lagi header.

Steps:

  1. Install plugin — Custom Post Template (not maintained but still working)
  2. Create new template, follow the simple instructions from plugin author – in my case, <?php ct_tracks_featured_image(); ?> has been removed
  3. The most hard task, edit all posts which containing featured image, MANUALLY! – look for featured image URL and insert somewhere into content

p/s: content di dalam post ini sangat membingungkan hahaha

WordPress landing page with Supersized

Before I start,

Click here if you wish to see it in action!

Click here to get some introduction of Supersized

Now let’s start!

First thing first, download this amazing image slider here. In this tutorial, I’ll be using the version for Flickr.

Second thing, of course you’ve got WordPress installed 🙂

Part 1, preparing the files

  • Extract the desired version (example: flickr) into your WordPress root folder (or in a another folder, but you need to change some path inside the coding)
  • Inside the folder, there is a main html file (example: flickr.html). Rename the file extension to .php (example: flickr.php)
  • Insert this at the top line of the file, then save it: <?php /** Template Name: Supersized **/ ?>
  • Copy the saved file into wp-content/themes/your-current-theme/templates

Part 2, little modification

Part 3, create a landing page, blog page and Reading Settings

  • Create a new page with title Landing Page, choose the saved file earlier (Supersized) as template (How to choose template) and leave the content empty
  • Create another page with title Blog, no template and content require for this
  • Go to WP-Admin > Settings > Reading > Front page displays and select the A static page (select below)
    — Front page: Landing Page
    — Posts page: Blog
  • Save the settings

Well, that’s all for basic. Of course I did a lot of modifications in the main html file. You might want to play around with it, enjoy! 🙂