Website Design – Zen Cart Ecommerce Integration – HolidayHope.net
17 Dec
13 Jul
Remove the word “Protected:” from title text of password-protected pages.
Big thanks to t31os on the WordPress forums. Check out t31os’s site for more WordPress tips.
The following filter function code is placed in the functions.php file, this way it doesn’t accidentally get replaced when WordPress is upgraded.
<?php
function the_title_trim($title)
{
$pattern[0] = ‘/Protected:/’;
$pattern[1] = ‘/Private:/’;
$replacement[0] = ”; // Enter some text to put in place of Protected:
$replacement[1] = ”; // Enter some text to put in place of Private:
return preg_replace($pattern, $replacement, $title);
}
add_filter(‘the_title’, ‘the_title_trim’);
?>
NOTE: I had to remove the *<?php* and *?>* tags from the above code and place the function code inside my existing *<?php* and *?>* tags that were already in my functions.php file. Otherwise, it messed up my Multi-level Navigation Plugin for WordPress (which I’m a big fan of).
WordPress version: 2.8.1 RC1
3 Nov
Magento Ecommerce: Create a new CMS page and have the link to it show up in the menu alongside the category links.
Brick House Bakery project: adding the Survey page link to the top navigation bar, alongside the existing category links.
1. Create a new CMS page, titled Survey, in Magento’s admin (Admin > CMS > Manage Pages > Add New Page)
This is our newly-created page’s path: http://www.brickhousebakery.com/survey
2. Add “Survey” link as a line-item (<li>) to the top menu (root > magento > app > design > frontend > default > default > template > catalog > navigation > top.phtml)
top.phtml file:
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* @category design_default
* @package Mage
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
?>
<?php
/**
* Top menu for store
*
* @see Mage_Catalog_Block_Navigation
*/
?>
<div class=”header-nav-container”>
<div class=”header-nav”>
<h4 class=”no-display”><?php echo $this->__(‘Category Navigation:’) ?></h4>
<ul id=”nav”>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
<!– bof – added line-item so survey link will appear in the navigation alongside the existing category links –>
<li><a href=”http://www.brickhousebakery.com/survey/”>Survey</a></li>
<!– eof – added line-item so survey link will appear in the navigation alongside the existing category links –>
</ul>
</div>
<?php echo $this->getChildHtml(‘topLeftLinks’) ?>
</div>
4 Oct
http://www.magentocommerce.com/boards/viewthread/4761/
Example:
So instead of this: http://www.domain.com/INDEX.PHP/category
I get this: http://www.domain.com/category