$post Object Output in WordPress

WP_Post Object

WP_Post Object
 (
 [ID] =>
 [post_author] =>
 [post_date] =>
 [post_date_gmt] =>
 [post_content] =>
 [post_title] =>
 [post_excerpt] =>
 [post_status] =>
 [comment_status] =>
 [ping_status] =>
 [post_password] =>
 [post_name] =>
 [to_ping] =>
 [pinged] =>
 [post_modified] =>
 [post_modified_gmt] =>
 [post_content_filtered] =>
 [post_parent] =>
 [guid] =>
 [menu_order] =>
 [post_type] =>
 [post_mime_type] =>
 [comment_count] =>
 [filter] =>
 )

GitIgnore Directory

.gitignore Directory

Example Directory name : uploads

Ignoring ALL folders and files

 # .gitignore
uploads

Result:

# Will Ignore

/uploads # directory
/uploads # file
/example/path/uploads # directory
/example/path/uploads # file

Ignoring only the Root Directory

The correct syntax for that is to put leading and trailing slash:

 # .gitignore
/uploads/

Result:

 # will ignore
/uploads # directory

# will NOT ignore
/uploads              # file
/some/path/uploads    # directory
/another/path/uploads # file

Ignoring only the Root Directory and the Root File

 # .gitignore
/uploads

Result:

# will ignore

/uploads # directory
/uploads # file

Ignoring only Folders and not Files

# .gitignore
uploads/

Result:

# will ignore:
/uploads # directory
/some/path/uploads # directory

# will NOT ignore:
/another/path/uploads # file

WordPress function execution order on a Page Load

General

init();
parse_request($query_args);
send_headers();
query_posts();
handle_404();
register_globals();

do_action calls are made in the following order

muplugins_loaded
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 registered_post_type
 registered_post_type
 registered_post_type
 registered_post_type
 registered_post_type
 plugins_loaded
 sanitize_comment_cookies
 setup_theme
 unload_textdomain
 load_textdomain
 after_setup_theme
 load_textdomain
 load_textdomain
 auth_cookie_malformed
 auth_cookie_valid
 set_current_user
 init
 registered_post_type
 registered_post_type
 registered_post_type
 registered_post_type
 registered_post_type
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 registered_taxonomy
 widgets_init
 register_sidebar
 register_sidebar
 register_sidebar
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_register_sidebar_widget
 wp_loaded
 parse_tax_query
 parse_tax_query
 posts_selection
 template_redirect
 admin_bar_init
 add_admin_bar_menus
 get_header
 wp_head
 wp_enqueue_scripts
 wp_print_styles
 wp_print_scripts
 get_template_part_content
 begin_fetch_post_thumbnail_html
 end_fetch_post_thumbnail_html
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 get_template_part_content
 begin_fetch_post_thumbnail_html
 end_fetch_post_thumbnail_html
 get_sidebar
 dynamic_sidebar_before
 dynamic_sidebar
 dynamic_sidebar_after
 get_footer
 twentytwelve_credits
 wp_footer
 wp_print_footer_scripts
 wp_before_admin_bar_render
 wp_after_admin_bar_render
 shutdown

 

Top Website Design Research

Top Website Design Research Points

  • Use F-Shaped Pattern
  • Use Z-Shaped Pattern
  • Don't let people more than 3 click to find their answer
  • Too many options ensure NONE will be chosen
  • Visitors read long widths of text faster, but prefer shorter widths
  • Your headlines draw even more eyes than images!
  • Image captions are the most consistently read in-post content
  • People follow the “line of sight” of other people
  • Don’t Make Users Wait: Speed Up Your Website
  • Make Your Content Easily Readable
  • Don’t Worry About "The Fold" and Vertical Scrolling
  • Place Important Content on the Left of a Web Page
  • Small Details Make a Huge Difference
  • Don’t Rely on Search as a Crutch to Bad Navigation
  • Your Home Page Isn’t As Important as You Think
  • Golden Ration in Web Design
    • Considering 900px total width page
      • Content area + Side bar
      • 900px / 1.62 = 555.55px = content area
      • Side bar = 345px
    • Considering for a rectangle block with 300px width
      • What is the height?
      • 300px/1.62 = 185px height
  • Mathematics and Design - Golden ration +The Rule of Thirds + Grid Systems

Source

Other Resources

Image Source : Pexels

Click Tracking [Google Analytics]

Event Tracking

<script>
/**
* Function that tracks a click on a link in Google Analytics.
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
*/
var trackLink = function(url) {
   ga('send', 'event', 'link', 'click', url, {
     'transport': 'beacon',
     'hitCallback': function(){document.location = url;}
   });
}
</script>

On Page Implementation

<a href="http://www.example.com" onclick="trackLink('http://www.example.com'); return false;">Visit example.com</a>