Category Archives: Wordpress

Short Code to get Custom Field on Post

Short Code to get Custom Field on Post had been quite a difficult task as the CFS has many options for field types. Install Plugin “ShortCode Exce PHP” and Add a New Short Code with Name: “get_Fields” and in the code area enter the code below.

The Usage is [get_Fields arg=”Custom_Field_Slug”] will return the Value in the Custom_Field_Slug. If Error then the Error is also displayed Continue reading

WordPress in subdirectory htaccess

wordpress in subdirectory htaccess

If the WordPress is installed in /wordpress subfolder then the blog can be accessed http://www.example.com/wordpress but if you want the blog to be default page servered by the web-server.. there are many ways to do this.. but involves modification to many files and coping index.php, wp-config.php etc.

A simple solution is to edit “.htaccess” in the root folder (if it does not exist use text editor to  create the file ) note the ‘.’ in file name

RewriteEngine On
# Not a necessity .. but a learn on .htaccess so that
# even Intranet access is available from Root..# OR is use
RewriteCond %{HTTP_HOST} ^(www.)?192.168.1.40$ [OR]
RewriteCond %{HTTP_HOST} ^(www.)?example.com$ [NC]
RewriteRule ^(/)?$ wordpress [L]
# Use the below if you want the user Browser to remember this redirect
# RewriteRule ^(/)?$ wordpress [L,R=301]

Edit 27 Sep 2014: “Pretty permalinks not working for sub-directory WordPress” with the above .htaccess

Solution: we require two .htaccess files Continue reading

WordPress Theme Arjuna-X Fixed after Upgrading to 3.5

WordPress 3.5 broke the Arjun-X Theme. The developer is not supporting anymore, hence it was left to the user adopting the theme to fix it. Test and proved method is detailed in post by Samuel Wood (Otto) Tech Ninja post.

The Issue is with JQuery Custom File in the theme. WordPress 3.5 has included the correct copies of JQuery-UI, hence the custom file “jquery-ui-1.8.10.custom.min.js is not required hence delete it and ref to this file in “function.php” hs to edit to as follows

// comment this line 
// wp_enqueue_script('arjunaJQueryMinJS', get_template_directory_uri() .'/lib/jquery-ui-1.8.10.custom.min.js');
// and add this line
wp_enqueue_script('jquery-ui-draggable');