All posts by matt

WordPress custom menu link target _blank

Problem

In WordPress at least for custom links, it would be great to allow menu options to open in a new window/tab via the target=”_blank” element in the link tags. Controlling menus in the WP Menu tool is awesome, but many of the sites I work with have external links in the main navigation menus that need to open in a new tab.

Solution

Custom link nav-menu

 

jQuery('a[title="_blank"]').each(
	function(i) {
		jQuery(this).attr('target', '_blank');
		jQuery(this).attr('title', jQuery(this).text());
	}
);

Result

<a title=”_blank” href=”http://www2.allegiantair.com/”>Allegiant Air</a>

turns into

<a title=”Allegiant Air” href=”http://www2.allegiantair.com/” target=”_blank”>Allegiant Air</a>

winebarstore.com

A startup venture using Magento as a company sponsored, team-building effort where my team created the dropshipping site, winebarstore.com.  It was an opportunity to discover a viable product using Google Ad Word tools, using social media marketing while having our own choice in an e-commerce platform.  Of course being picked to be a team captain, Magento was a none debated choice.

How to remove index.php from the URL of a new install of a Magento Store

How to remove index.php from the URL of a new install Magento Store

sudo vi .htaccess

uncomment

# RewriteBase /magento/

and change it to

RewriteBase /

Since I had a newly install version of Ubuntu web server, I needed to enable ModRewrite in apache

sudo a2enmod rewrite

Then you need to restart apache

sudo /etc/init.d/apache2 restart

Then goto your admin panel and enable the Rewrites. You can find it at System->Configuration->Web->Search Engine Optimization

Then goto Cache management page (system cache management ) and refresh your cache and refresh the Web Rewrites.