Results 1 to 10 of 1859

Threaded View

  1. #11
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    814
    Plugin Contributions
    0

    Default Re: Wordpress On Zencart / Released

    Holy Smokes That Was Tough!

    Okay so a page back you can see (with help from rainthebat) we have the problem with the manufacturers and other filters fixed.

    Now to add CUSTOM METAS per post, category, page. . .

    FOR ZC 1.3.8A & WP 2.7.1 with ZC & WP installed in the root (public_html) together. Running with the .htaccess mod and permalinks set to custom /%postname%/.

    If you're running a blog(wp) you need to SEO it anyways so do these things. Add something like this to your .htaccess file.
    Code:
    RewriteCond %{REQUEST_FILENAME} !-f [NC] 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^BLOGNAMEHERE/ index\.php?main_page=wordpress&%{QUERY_STRING} [L]
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    Create 3 files as follows:

    Create a folder inside of includes/templates/template_default/ Called wordpress. In this folder upload a copy of html_header.php from your templates common directory. Replace
    PHP Code:
    require(DIR_WS_MODULES zen_get_module_directory('meta_tags.php')); 
    with
    PHP Code:
    require(DIR_WS_MODULES zen_get_module_directory('wp_meta_tags.php')); 
    Next: Save the following code as " wp_meta_tags.php " and upload it to includes/modules
    PHP Code:
    <?php
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
    // This should be first line of the script:
    require(DIR_WS_LANGUAGES 'english/12volt/wp_meta_tags.php'); 
    function 
    curPageURL() { 
     
    $pageURL $_SERVER["REQUEST_URI"];
     return 
    $pageURL;
      } 
        
    $wpPageBase curPageURL();
        echo 
    strtoupper($wpPageBase);

    // if per-page metatags overrides have been defined, use those, otherwise use usual defaults:

      
    if (defined('META_TAG_TITLE_' strtoupper($wpPageBase))) define('META_TAG_TITLE'constant('META_TAG_TITLE_' strtoupper($wpPageBase)));
      
       if (
    defined('META_TAG_KEYWORDS_' strtoupper($wpPageBase))) define('META_TAG_KEYWORDS'constant('META_TAG_KEYWORDS_' strtoupper($wpPageBase)));
      
      if (
    defined('META_TAG_DESCRIPTION_' strtoupper($wpPageBase))) define('META_TAG_DESCRIPTION'constant('META_TAG_DESCRIPTION_' strtoupper($wpPageBase)));
    Next: Save the following code as " wp_meta_tags.php " and upload to includes/languages/english/YOURTEMPLATE/

    PHP Code:
    <?php
    //Copy and paste this set of defines replacing /BLOGNAME/POST-NAME/ to fit your blog name and post name as you go.

      
    define('META_TAG_TITLE_/BLOGNAME/POST-NAME/''Type Your Post Meta Title Here');
      
    define('META_TAG_KEYWORDS_/BLOGNAME/POST-NAME/','Type Your Post Meta Keys Here');
      
    define('META_TAG_DESCRIPTION_/BLOGNAME/POST-NAME/','Type Your Post Meta Descrip Here');

     
    ?>
    Meta Defining works like this: The address of your post would be http://www.yoursite.com/blogname/post-name/
    so the define would look like those above. Every letter must be captialized and the forward slash after your domain name and after the post address must be included (like the example).

    This works for blog categories and pages too and the defines look like this:
    /BLOGNAME/CATEGORY/CATEGORY-NAME
    /BLOGNAME/PAGE/PAGE-NAME

    The define examples above have some red text in them. That must be there for a category or a page.

    Enjoy!

    John
    Last edited by bumba000; 7 Apr 2009 at 07:35 AM.

 

 

Similar Threads

  1. EasyPopulate 4.0 Support Thread
    By chadderuski in forum Addon Admin Tools
    Replies: 3668
    Last Post: 7 Jun 2025, 11:33 PM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 20
    Last Post: 23 Apr 2025, 08:49 AM
  3. WordPress® for Zen Cart® (wp4zen) [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 109
    Last Post: 1 Dec 2024, 01:36 PM
  4. PurpleShades Support Thread
    By kobra in forum Addon Templates
    Replies: 122
    Last Post: 18 May 2011, 07:18 PM
  5. ZJ Black 2 support thread
    By Liamv in forum Addon Templates
    Replies: 1
    Last Post: 15 Feb 2010, 02:53 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