Forum Replies Created

Viewing 15 replies - 16 through 30 (of 41 total)
  • Thread Starter redknite

    (@redknite)

    no help here?

    do you have suggestions as to which those might be?

    Thread Starter redknite

    (@redknite)

    do you have a suggestion as to what plugin i might use? Or is there any plan to make it work with this plugin?

    Thread Starter redknite

    (@redknite)

    just noticed that the last 4 lines of my code :

    Region: <?php echo $mypod->field('$first_wine.pa_region'); ?><br />
    Varietal: <?php echo $mypod->field('$first_wine.varietal'); ?><br />
    post id is: <?php echo $mypod->field('$first_wine.pod_item_id'); ?>.<br />
    <image src="<?php echo $mypod->field('$first_wine_post_thumbnail_url'); ?>"><br />

    had the dollar sign in front of first_wine.
    I changed it to:

    Region: <?php echo $mypod->field('first_wine.pa_region'); ?><br />
    Varietal: <?php echo $mypod->field('first_wine.varietal'); ?><br />
    post id is: <?php echo $mypod->field('first_wine.pod_item_id'); ?>.<br />
    <image src="<?php echo $mypod->field('first_wine_post_thumbnail_url'); ?>"><br />

    The code no longer returns “array” but now is blank… for several items.

    it did let me return price though by saying:
    <?php echo get_post_meta( $mypod->field('first_wine.pod_item_id'), '_regular_price', true); ?>

    I’m getting there!

    Thread Starter redknite

    (@redknite)

    so i changed this a bit and still don’t see how to pull the product price or image.

    I re-wrote the code again (inside the loop this time) and here is what i have:

    //START THE PODS LOOP TO PULL IN THE 6 WINES.
    $mypod = pods('post', get_the_id() );
    $fwine = $mypod->field('first_wine');
    ?>
    <div id="<?php echo $name; ?>">
    <h1>The first wine this month is <a href="<?php echo $mypod->field('first_wine.post_title'); ?>"><?php echo $mypod->field('first_wine.post_title'); ?></a></h1>
    content: <?php echo $mypod->field('first_wine.post_content'); ?><br />
    Region: <?php echo $mypod->field('$first_wine.pa_region'); ?><br />
    Varietal: <?php echo $mypod->field('$first_wine.varietal'); ?><br />
    It was bottled in <?php echo $mypod->field('$first_wine.region'); ?>.<br />
    <image src="<?php echo $mypod->field('$first_wine_post_thumbnail_url'); ?>"><br />
    </div><!-- close -->
    
    <pre> <?php print_r( $fwine );?></pre>  <!-- THIS LINE WILL PRINT THE ARRAY  -->

    I added the var $fwine to see the full array for the first wine. when I print the array for $fwine, the array below is what i get, and there is no product price.

    Array
    (
        [ID] => 179
        [post_author] => 1
        [post_date] => 2015-03-18 03:06:12
        [post_date_gmt] => 2015-03-18 03:06:12
        [post_content] => Winemaker Marco Pallanti has farmed this estate in Chianti Classico since 1982, and he knows its vineyards well, producing acclaimed single-vineyard wines with the help of wife and co-owner Lorenza. San Lorenzo is a small valley, with 50 acres of vines planted in a mix of limestone and clay at an elevation of 1,650 feet. The 2010 is 80 percent Sangiovese, with Malvasia Nera and Merlot. A racy, vibrant red that shows the elegance of the site, it is the top-scoring Chianti Classico tasted this year.
        [post_title] => 2010 Castello Di Ama Chianti
        [post_excerpt] =>
        [post_status] => publish
        [comment_status] => open
        [ping_status] => closed
        [post_password] =>
        [post_name] => 2010-castello-di-ama-chianti
        [to_ping] =>
        [pinged] =>
        [post_modified] => 2015-03-18 03:43:29
        [post_modified_gmt] => 2015-03-18 03:43:29
        [post_content_filtered] =>
        [post_parent] => 182
        [guid] => https://selectcru.rudtek.com/?post_type=product&p=179
        [menu_order] => 0
        [post_type] => product
        [post_mime_type] =>
        [comment_count] => 1
        [pod_item_id] => 179
    )
    Thread Starter redknite

    (@redknite)

    Josh, thanks for the quick reply. Here’s what I intend. I want to be able to have a monthly blog post (titled something creative…like Aprils wines!) And when i’m drafting the post i want to choose 6 products from woocommerce through dropdown relation pod choices. (this part works)

    what the reader will see is the a brief hello (actual post description) in the next section there will be the six wines listed each with a description, price and the photo.

    Based on my code, what would i say to pull the product cost from first_wine? or the image? I’m missing something simple, i know, but i’m still missing it.

    Thanks again!

    Thread Starter redknite

    (@redknite)

    Thank you for replying to me and for the help!

    name was only there in case i wanted to format the individual divs for each product. Right now it’s just a place holder…no use…so it’s removed in my revised code.

    How would i pull a product price, image, etc?

    I revised the code a little and put it in a loop but that brings a whole new problem. when I add new posts, it adds all the “first_wines, etc” to each of the posts. ie, if i have 3 posts in my wordpress site, it re-iterates the first_wine, second_wine… for each page on each page. So i would have 3 first_wines.

    If i take the loop off this code, no matter what I do it pulls the data from the very first post i made no matter which post i’m on.

    <?php
    
      $mypod = pods('post', get_the_id() );
      $mypod->find('name ASC');   
    
    while ( $mypod->fetch() ) :
        ?>
    <div>
    <h1>The first wine this month is <a>field('first_wine.post_title'); ?>"><?php echo $mypod->field('first_wine.post_title'); ?></a></h1>
    content: <?php echo $mypod->field('first_wine.post_content'); ?>
    Region: <?php echo $mypod->field('$first_wine.pa_region'); ?>
    Varietal: <?php echo $mypod->field('$first_wine.varietal'); ?>
    It was bottled in <?php echo $mypod->field('$first_wine.region'); ?>.
    <image src="<?php echo $mypod->field('$first_wine_post_thumbnail_url'); ?>">
    Image thumbnail_url: <?php echo $mypod->field('$first_wine_post_thumbnail_url'); ?>
    </div><!-- close -->
    <?php endwhile; ?>
    Thread Starter redknite

    (@redknite)

    any further update on this?

    Thread Starter redknite

    (@redknite)

    never mind. I figured it out.

    Thread Starter redknite

    (@redknite)

    any help with this?

    Thread Starter redknite

    (@redknite)

    Turns out it is a conflict with Cherry plugin. if i uninstall that plugin it starts working again. I need the plugin for my theme to work though. I’m getting close, but don’t know where to go from here.

    Thread Starter redknite

    (@redknite)

    Baden,
    i just tried to go to the them twenty-fourteen as well and it still doesn’t load the timer. When i look at the page source on it it shows that the jquery is 1.11.1 though.

    i’m getting this error as well. what is causing it?

    Thread Starter redknite

    (@redknite)

    there is no link in my header. the best i could find was in my theme-functions they referenced it like this:
    wp_register_script('jquery', PARENT_URL.'/js/jquery-1.7.2.min.js', false, '1.7.2');

    i downloaded 1.11.1 and placed this in teh same directory as the 1.7.2 and then changed the above reference to the right version umber and it didn’t do anything but break my site.

    If i just delete the reference, the the site doesn’t work at all.

    Thanks for your help on this!

    Thread Starter redknite

    (@redknite)

    btw, mine isn’t counting seconds either. Site is https://www.rudtek.com/rhapsody

Viewing 15 replies - 16 through 30 (of 41 total)