Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2007
    Location
    Minneapolis, MN, United States
    Posts
    71
    Plugin Contributions
    0

    Default Adding Wordpress to Zen Cart

    All I needed was a way to display only the post from my word press on my zencart.
    I found a way without installing any mods.

    All you need to do is put the following on whatever page you need to display the post on.

    Code:
    <?php
    include('http://www.your_site.com/your_word_press/index.php');
    ?>
    This will post the entire page into the main section of your zencart to change what appears here you need to change the wordpress theme to fit your needs. You can display post or the sideboxes as well. it all depends on your wordpress theme.

    You can even add this code to your tpl_main_page.php to remove the zen sideboxes so that you actually display your wordpress page under your zen cart header.

    Code:
    //add page names that you wantto disable left and right columns
    	$center_column_only = array('WORDPRESS PAGE'); 
    	// the following IF statement can be duplicated/modified as needed to set additional flags
      	if (in_array($current_page_base,$center_column_only) ) {
        		$flag_disable_right = true;
        		$flag_disable_left = true;
      	}
    EXAMPLE HERE
    I dont care what it says next to my name. I've been Zenned!

  2. #2
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Adding Wordpress to Zen Cart

    interesting. You made an ez page with the blog included. Where did you put the include statement so that it only shows on that ezpage?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  3. #3
    Join Date
    Jul 2007
    Location
    Minneapolis, MN, United States
    Posts
    71
    Plugin Contributions
    0

    Default Re: Adding Wordpress to Zen Cart

    All you do is put it where you want the blog to appear. simply make your ez page and put the include statement in it. There is one modification you need to make first.

    Check out this thread to see how to allow php includes inside your ez pages

    http://www.zen-cart.com/forum/showthread.php?t=37252


    If you want it to appear elsewhere like on the main page simple put the code in the define_main_page.
    I dont care what it says next to my name. I've been Zenned!

  4. #4
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Adding Wordpress to Zen Cart

    Thanks for expanding my knowledge!!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

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

    Default Re: Adding Wordpress to Zen Cart

    I like this and have tested it on my test site. But, I'm running into two problems. First, the Wordpress blog is waaaay too wide and I can't change the CSS without upgrading so for that problem I will just have to turn off the Zen Cart sideboxes.

    The second problem is that when readers click on links in the blog(especially the comments) it navigates them away from the my site and to wordpress. Any way to prevent this?

    -lindasdd

  6. #6
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Adding Wordpress to Zen Cart

    add target="_blank":

    <a href="#" target="_blank">link</a>
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

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

    Default Re: Adding Wordpress to Zen Cart

    yellow,
    I understand what you are indicating, but I'm not sure where to put it because I don't have access to adjust the "guts" of the links the blog. Is there a place to do this on the EZ-page so that it universally affects the blog links?

    thanks,
    lindasdd

  8. #8
    Join Date
    Jul 2007
    Location
    Minneapolis, MN, United States
    Posts
    71
    Plugin Contributions
    0

    Default Re: Adding Wordpress to Zen Cart

    None that I know of there is a wordpress mod. But that was too complicated for my needs
    I dont care what it says next to my name. I've been Zenned!

  9. #9
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Adding Wordpress to Zen Cart

    I would either rewrite the WP code a bit, or you can do a trick like this: assign a class to all the links (should be done easily using WP template system). Then use JS to automatically find and insert target="_blank" for all link (elements) of that class.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

 

 

Similar Threads

  1. Zen Cart On Wordpress?
    By maz07 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 25 Sep 2011, 08:32 AM
  2. Examples of Wordpress on Zen Cart?
    By diane22 in forum General Questions
    Replies: 6
    Last Post: 7 Jun 2010, 08:23 AM
  3. Wordpress and Zen-Cart
    By gene6482 in forum General Questions
    Replies: 1
    Last Post: 1 Feb 2007, 04:01 AM
  4. WordPress and Zen Cart
    By jamiemcparland in forum All Other Contributions/Addons
    Replies: 18
    Last Post: 7 Jan 2007, 02:10 PM

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