Results 1 to 10 of 10
  1. #1

    Default How to Add Content Below category listings?

    Looking to do something that is mainly for on-page SEO. I want to be able to put text content below everything, on any page.

    Example. This is my main "iron baluster" category. http://cheapstairparts.com/iron-balusters

    Under all of the sub-category buttons I want to have 2-3 paragraphs of text that I can write about Iron Balusters, just to increase my text to HTML ratio and do some SEO stuff there.

    Is there a mod like this out there or could somebody create one? Where do I post for paid work?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to Add Content Below category listings?

    Swguy's boilerplate file tips could be adapted to your desires. My Extra Boilerplate extension of that (not yet released) may actually be best suited to what you want to do; I will attach it here if you want to test it. It probably needs a bit of cleanup before releasing into the wild. I think it could be dropped into the category page (only one function call required) and work on a trigger in the category description as well as in the product description.

  3. #3
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: How to Add Content Below category listings?

    Why not just add the lines below your header picture for the category, would be much simpler, or instead of that jpeg image you have with text on it, make it spiderable text instead.

    I would also add the words 'Iron Balusters' to the end of every subcategory title, so 'Twist & Basket' becomes 'Twist & Basket Iron Balusters'

    Would help SEO a lot.

  4. #4

    Default Re: How to Add Content Below category listings?

    Adding that banner has upped my conversion rate 3-4%. I don't want to push the categories / products down any further than I have. That is why I want the SEO text content below everything.

    email me anything you want me to test. sales (at) cheapstairparts (dot) com

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How to Add Content Below category listings?

    Actually it was a different mod that needs cleanup before others try to use it. The Extra Boilerplate code is so small I can just post it here.

    /includes/functions/extra_functions/extra_boilerplate_functions.php
    PHP Code:
    <?php
    /**
     * @copyright Copyright 2011 Glenn Herbert
     * @license http://www.gnu.org/licenses/ GNU Public License V3.0
     * /includes/functions/extra_functions/extra_boilerplate_functions.php
     * Extra Boilerplate by Glenn Herbert (gjh42) 2011-03-18
     * based on swguy's boilerplate file technique - can be used alongside it
     */

     
    function html_include_cb($match) {
          
    $prefix "HTML_INCLUDE_";
          
    $match_filename str_replace($prefix''$match[0]); 
          
    $filename DIR_WS_LANGUAGES $_SESSION['language'] .  
                     
    '/boilerplate/' 
                     
    $match_filename  ".html";
          
    $buffer "";
          if (
    file_exists($filename)) { 
              
    $handle = @fopen($filename"r"); 
              while (!
    feof($handle)) {
                  
    $buffer .= fgets($handle4096); 
              }
              
    fclose($handle);
          }
          return 
    $buffer;
    }

    function 
    extra_boilerplate($products_description$output=true) {//proofing against empty description 20110417
      
    $extra_text = array();
      if (
    $products_description != '') { 
        
    $pattern "/HTML_X_INCLUDE_[a-zA-Z0-9]*/";
        
    preg_match_all($pattern$products_description$match);
        
    $match[0] = str_replace('HTML_X_INCLUDE_','HTML_INCLUDE_',$match[0]);
        foreach(
    $match[0] as $key => $value){
          
    $bit str_replace('HTML_INCLUDE_','',$key);
          
    $item[0] = $value;
          
    $extra_text[$bit] = html_include_cb($item);
        }
      }
    //echo blank or return empty array if no desc
      
    if ($output) {// output immediately or return array content
        
    echo implode('',$extra_text);
      }else{
        return 
    $extra_text;
      }
    }
    ?>
    readme_eb1_0.txt
    Code:
     * @copyright Copyright 2011 Glenn Herbert
     * @license http://www.gnu.org/licenses/ GNU Public License V3.0
     * Extra Boilerplate by Glenn Herbert (gjh42) 2011-04-17
     * based on swguy's boilerplate file technique.
     * can be used in conjunction with the original technique;
     * leave the function code out of tpl_product_info_display.php.
    
    Files included:
    /includes/functions/extra_functions/extra_boilerplate_functions.php
    /includes/languages/english/boilerplate/bp1.html
    
    FTP the /includes/ folder in this package to the root of your store. 
    The files will automatically be placed in the correct locations.
    
    Add to your custom product info page file, in the location you want the new text: 
    (/includes/templates/your_template/templates/tpl_product_info_display.php)
    
    <!-- bof html description -->
    <?php extra_boilerplate($products_description); ?>
    <!-- eof html description -->
    
    
    Add to the product description (doesn't matter where) in admin:
    
    <!-- HTML_X_INCLUDE_bp1 -->
    
    Replace bp1 with the filename you want to use.
    Save your boilerplate file as
    /includes/languages/english/boilerplate/bp1.html
    
    You can have as many versions of  HTML_X_INCLUDE_whatever  as you like 
    inside the comment tags; they will be output in the order they appear.
    
    ================================================================
    Advanced usage:
    
    To manipulate the text with PHP, call the function like
    
    $extra_boilerplate = extra_boilerplate($products_description, false);
    
    You can now do what you like with the content of $extra_boilerplate,
    which will hold an array with each file's content as the value of its filename as key.
    
    foreach($extra_boilerplate as $key=>$value){//output size chart(s) if any
      if(strpos($key,'size_chart') !== false) echo $value;
    }
    ================================================================
    You can adjust the function call to refer to $categories_description:


    <!-- bof html description -->
    <?php extra_boilerplate($categories_description); ?>
    <!-- eof html description -->

  6. #6
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: How to Add Content Below category listings?

    Quote Originally Posted by CheapStairParts View Post
    Adding that banner has upped my conversion rate 3-4%. I don't want to push the categories / products down any further than I have. That is why I want the SEO text content below everything.

    email me anything you want me to test. sales (at) cheapstairparts (dot) com
    Yes, it would do. I have similar things on every category on all of the sites I have. But you could make that banner proper content of images AND spiderable text, instead of being a full jpeg image.

  7. #7

    Default Re: How to Add Content Below category listings?

    Just wanted to update this for people looking for the same thing

    I actually paid a freelancer $50 to create this for me.

    http://cheapstairparts.com/iron-balusters

    scroll to the bottom. It added a 2nd content block. You add the bottom content in the admin panel in the same place you edit the top area descriptions.

    I'm pretty impressed. Now I can SEO All of my product category pages without having to push the category links farther down the page.

  8. #8
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: How to Add Content Below category listings?

    You could also use this code in the category description...

    <script language="javascript">
    function toggle() {
    var ele = document.getElementById("toggleText");
    var text = document.getElementById("displayText");
    if(ele.style.display == "block") {
    ele.style.display = "none";
    text.innerHTML = "More Info...";
    }
    else {
    ele.style.display = "block";
    text.innerHTML = "Close";
    }
    }
    </script>

    <a id="displayText" href="javascript:toggle();">More Info...</a><div id="toggleText" style="display: none">CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT </div>

    This will make a 'More Info...' link which opens up a div with all your content in which will open ABOVE the categories. If you actually removed the More Info and put a decimal point for instance which a customer probably wouldnt even notice, this effectively would be like having hidden content which search engines will not penalise and will spider accordingly.

  9. #9
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: How to Add Content Below category listings?

    Hate to jump in after you've had a custom mod made, but I think this free one does the trick - or at least it did for me:

    Short Description of Categories MOD

    -lindasdd

  10. #10
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: How to Add Content Below category listings?

    Quote Originally Posted by lindasdd View Post
    Hate to jump in after you've had a custom mod made, but I think this free one does the trick - or at least it did for me:

    Short Description of Categories MOD

    -lindasdd
    Thats excellent, thanks for that.

 

 

Similar Threads

  1. How to get content below subcategory listings on a parent category page
    By stoneroses6300 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Jan 2013, 12:24 AM
  2. How do I add custom content to my category page
    By MULISH in forum Basic Configuration
    Replies: 1
    Last Post: 30 Apr 2009, 11:55 PM
  3. How do I place the category bar below the content of define_main_page.php?
    By Earl Parker II in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Dec 2007, 03:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR