Category: WordPress
How to view invisible files on Mac.

After dealing with a lot of .htaccess files in connection with several websites. If you uncompress a .zip or transfer the file from a web server to your desktop via FTP, the file never shows up. Thus making very difficult to edit.

A file that starts with a period is one of the files that OS X hides by default so that you don’t accidentally delete and or alter it thus messing up your file system. However, there could be times that you want access to those hidden mac files. Strangely Apple has not made easy as toggling a menu item in the Finder.

Here is a simple and free solution for you to follow the following few steps. After writing a line or two of code you’ll be able to use Apple’s Automator software to create a plugin that you can use to toggle the view of hidden files from within Finder.

After opening Automator, select Automator from within the Applications Library on the left-hand side. You’ll now see a number of different built-in actions that are available to the Automator application.

Select Run Shell Script from the list of available actions, and drag it into your workflow.

Type (or paste in) the following code into the Run Shell Script text box:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Now that your workflow is finished, choose File > Save As Plugin and choose Finder as the Application. Then save your plugin-in as ShowHiddenFiles or something else that sounds self explanitory.
Now, from the Finder or desktop, simply right-click and the contextual menu will appear. Choose Automator > ShowHiddenFiles and the Finder will restart showing all the hidden files.
Now you will want to create a way to go back to normal viewing. So simply edit the above work flow by chaning “FALSE” for “TRUE” and save the new plug-in as HideHiddenFile.
This Automater solution saves you from having to buy a fancy utility application to view your hidden files.
Did you like this? Share it:
 
WordPress comments to display under post.

What I’d wanted to do is display the comments without the viewer having to click “1 comment” or “2 comments” and take them to another page. Your theme has this code in some or all of these files: index.php, single.php, archives.php.

To display the full comment and option to reply instead of the “click for comments” link.

In the appropriate file, replace the code that looks something like this:

<p><?php the_tags(); ?><?php edit_post_link('Edit',' ',''); ?
> <br /><?php comments_popup_link ('Click here to Comment on this post',
'1 Comment- click to read', '% Comments - click to read'); ?> </p>

<?php
  $withcomments = "1";comments_template();
?>
Did you like this? Share it:
 
How to Exclude Pages from WordPress Nav Bar

I wanted to have a page that people could get to from a URL only and if you make the page private in the admin option then this will remove the page from the menu, and you will be able to access it by entering the URL. However take note that when you log out you will not be able to see the page contents. This also goes for you users.

So if you want to publish a page that public people can see full content from just hitting a URL then you need to publish it and then exclude it from the navigational function. Find your function.php and then modify the code. WordPress creates the menu with this function: wp_list_pages();

You can either remove that function and add your own links, or add the “exclude” argument to wp_list_pages(); like this: wp_list_pages(‘exclude=1,2,39′);

The numbers are the page id’s. You can find the page id from the manage pages section of your wordpress blog admin. This method however did not work for me as my nav menu have a drop down ability. So I had to code it like this.

wp_list_pages(‘include=1,2,39&title_li=’);

You can read about all the options on this WordPress Development Page

Good luck in coding your page.

Did you like this? Share it: