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:clap:
Re: Wordpress On Zencart / Released
You may comment out the
PHP Code:
echo strtoupper($wpPageBase);
by adding // before it.
Otherwise your blog post address will printed out in all upper case letters on the top left corner of your site probably under the logo.
With this address showing you can simply copy and paste the text from your site into the defines without typos .
Re: Wordpress On Zencart / Released
Hi All,
Please forgive me and make the following correction.
When defining metas for a wordpress PAGE do not include /PAGE/
The define should look like this
PHP Code:
define('META_TAG_TITLE_/BLOGNAME/PAGE-NAME/', 'Type Your Page Meta Title Here');
The category defines should be as previously stated.
Re: Wordpress On Zencart / Released
Not to totally change the subject here, but quick question (that hopefully hasn't been asked yet.)
I'm all integrated up with a Wordpress Blog on our site, but my question comes from the layout. Is it possible to have just the titles listed and when someone clicks on a title the Blog expands revealing the full post?
So let's say my Blog title was Smiley Faces. Now, I click on Smiley Faces and I get this:
"Smiley Faces
Who doesn't love a smile? :D"
Yadda yadda. I hope this makes sense! :blush:
Oh, and Blog is here if you want to see why (very long): http://www.monumentalgiftbaskets.com...page=wordpress
Thanks
Re: Wordpress On Zencart / Released
eggdashure,
Not so sure about that. Sounds like javascript or possible a css thing. You have other problems that for me would take priority. Have you clicked on the blog title or a post title? Doing so takes you outside of ZC.
For this I would start looking to the .htaccess. Not so sure that I would find the problem there but that's where I would start.
Good Luck,
John
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
bumba000
eggdashure,
Not so sure about that. Sounds like javascript or possible a css thing. You have other problems that for me would take priority. Have you clicked on the blog title or a post title? Doing so takes you outside of ZC.
For this I would start looking to the .htaccess. Not so sure that I would find the problem there but that's where I would start.
Good Luck,
John
I would say that before messing with the .htaccess file that if eggdashure reviewed WOZ install instructions he will find he missed a step that this would resolve this issue... If I had to hazzard a guess I think that the WordPress setup portion of the WOZ instructions should be reviewed.
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
eggdashure
Not to totally change the subject here, but quick question (that hopefully hasn't been asked yet.)
I'm all integrated up with a Wordpress Blog on our site, but my question comes from the layout. Is it possible to have just the titles listed and when someone clicks on a title the Blog expands revealing the full post?
So let's say my Blog title was Smiley Faces. Now, I click on Smiley Faces and I get this:
"Smiley Faces
Who doesn't love a smile? :D"
Yadda yadda. I hope this makes sense! :blush:
Oh, and Blog is here if you want to see why (very long):
http://www.monumentalgiftbaskets.com...page=wordpress
Thanks
The file that drives the display of the main blog page in WordPress is the index.php file. You would need to determine which part of the code on that page drives the display of the blog post text. It's probably simply a matter of removing that code so that only the title link remains. You might get an exact answer for this by checking the WordPress forum for an answer.. Also remember that WordPress does NOT have an override system like Zen Cart does for it's templates.. So if you are using the default WordPress template, a WordPress upgrade MAY wipe out your changes..
Re: Wordpress On Zencart / Released
Sorry Diva,
Yeah, do make sure you have installed step by step properly is a great place to start. Just figured that would come naturally.
John
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
eggdashure
"Smiley Faces
Who doesn't love a smile? :D"
Yadda yadda. I hope this makes sense! :blush:
Very nice :)
Just gonna point in a direction, because I don't know how to do that. There is a plugin called Ajaxed WordPress which I would highly recommend (for anyone with wordpress) first off. Secondly, here is a link to the various Wordpress Ajax plugins.
regardless, the way to acheive what you want is through Ajax (Asyncronous Javascript and XHTML). There are plenty of plugins available which do the hard work for you, some interfere with each other, or this or that, so do one plugin at a time and test it all around to check compatibility with your site.
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
bumba000
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>
Thank you for that posting, very useful.
I do have a question, specifically what does BLOGNAMEHERE/ represent? Is it a path?