Announcement

Collapse
No announcement yet.

Put Wordpress Posts On Merchant Storefront Page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Put Wordpress Posts On Merchant Storefront Page?

    Hi there, Everyone:

    I would like to put the latest three or four posts from our wordpress blog onto the storefront (SFNT) page of our Miva Merhcnat store. (actually, I just want to show the title, excerpt, and link for the three latest posts - not the whole text).

    I am using toolkit so I am pretty sure of a way to do it, but I just don't have the brain power to figure it out this morning.

    I am assuming I would have to create a new page in wordpress that would show the three latest posts, then use toolkit to render that page on the Merchant storefront.

    Does that sound right?

    Thanks in advance.
    Mark Romero
    ~~~~~~~~

    #2
    Re: Put Wordpress Posts On Merchant Storefront Page?

    Mark,

    Create a file and upload it into your mm5 directory. Include the following code in the file, and then use the toolkit to render it. Not tested, so may need some tweaking.

    Code:
    <?php
    // Include Wordpress for pulling into MM
    define('WP_USE_THEMES', false);
    require('../blog/wp-load.php');
    ?>
    $args = array( 'numberposts' => '3' );
    $recent_posts = wp_get_recent_posts( $args );
    foreach( $recent_posts as $recent ){ ?>
    	<div><h2><?php echo $recent["post_title"];?></h2>
             <?php
    		$queried_post = get_post($recent["ID"]);
    		$excerpt = $queried_post->post_excerpt;
    		$excerpt = apply_filters('the_excerpt', $excerpt);
    		$excerpt = str_replace(']]>', ']]&gt;', $excerpt);
    		echo $excerpt; 
              ?>
              </div>
    <?php 
    	}
    ?>

    Comment


      #3
      Re: Put Wordpress Posts On Merchant Storefront Page?

      Thank You So Much, Leanne!!!

      I will try it out and let you know how it goes.

      Thanks again!!!
      Mark Romero
      ~~~~~~~~

      Comment


        #4
        Re: Put Wordpress Posts On Merchant Storefront Page?

        Originally posted by Siamese-Dream.Com View Post
        Thank You So Much, Leanne!!!

        I will try it out and let you know how it goes.

        Thanks again!!!
        Mark,

        If that doesn't work for you, I have a way of doing this in MivaScript and implemented with Tool Belt, doing it without PHP removes unnecessary server-load.

        Let me know if you're interested.
        PCINET, LLC

        Miva Merchant Design, Development, Integration & Support
        We built the most Miva Merchant stores!
        Miva shopping cart design & integration service and our Portfolio!

        e-mail: [email protected]
        web: www.pcinet.com

        "We who cut mere stones must always be envisioning cathedrals."
        Quarry Worker's Creed

        Comment


          #5
          Re: Put Wordpress Posts On Merchant Storefront Page?

          Titus,
          I'm very much interested in using toolbelt to accomplish displaying the last few wordpress postings in my storefront.
          We use wordpress for our CMS for all non store stuff so it's easy to keep up to date. I want to have a little feed display on the storefront because old customers tend to not checkout the other areas of the website. Can you share your code please?

          Comment

          Working...
          X