Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter imaginocracy

    (@imaginocracy)

    That worked, thank you!

    Thread Starter imaginocracy

    (@imaginocracy)

    Barry, glad I could help, that was a tough nut. Ankit the missing link in your posts is how to use $returnedArray[X]. I had to piece together and troubleshoot my code via probably 4 or 5 different posts to figure it out.

    Thread Starter imaginocracy

    (@imaginocracy)

    Update:

    <?php
    	/** single product featured image (second featured image)
    	 *
    	 */
    
    		if (function_exists('dfi_get_featured_images') ) {
    
    			$featuredImages = dfi_get_featured_images( $returnedArray[1] );
    
    			if( !is_null($featuredImages) ) {
    
    				echo '<div class="featured-image featured-image-desktop hidden-xs">'; // featured image wrapper
    
    				foreach($featuredImages as $images) {
    
    					echo '<img src="' . $images['full'] . '" />';
    
    				}
    
    				echo '</div>';
    
    			}
    		}
    ?>

    This works. Thanks for the great plugin Ankit!

    Thread Starter imaginocracy

    (@imaginocracy)

    add_action( 'after_setup_theme', 'my_image_sizes' );
    
    function my_image_sizes() {
    	add_image_size( 'mobile', 767, 600, true );
    	add_image_size( 'desktop', 1170, 500, true );
    }

    The answer was to call this after_setup_theme, and changing the value to ‘true’ because by default it only fits to smallest x,y parameter.

    Thread Starter imaginocracy

    (@imaginocracy)

    Hi Andrew,

    I was sizing all my featured images myself prior to uploading to the correct size, but that will not be convenient for my client, so we’d like to use a custom size.

    Thread Starter imaginocracy

    (@imaginocracy)

    Hi esmi, thanks for the quick reply. Regarding aspect ratio, shouldn’t WP just take the original image, resize it to 1170×975 (correct aspect ratio) and crop the now 1170×975 image to 1170×500?

    It should work regardless right? Or am I wrong here?

    Here are places to check:

    ADMIN SECTION:
    Settings > Social Media Links (if you’re using a plugin)
    Widgets > Check all widget areas for any sign of social media links
    Plugins > Check if you are using a social media plugin, if so, try clicking on settings there
    Media > Search for share-facebook.png and see if it might possibly be attached to a post; this is very unlikely to help but it may give an idea of where the file is being called

    It is also possible it is hard coded into one of the template PHP files. Open the following PHP files in a text editor or under the Appearance > Editor menu and ctrl-F (search) for: “share-facebook.png”

    Sidebar.php
    Page.php
    Page-*.php (anything that begins with “page-” (unlikely to find here as it would require duplicate code on all these pages but it is possible)

    Try that and let me know what you find.

    The other thing is, did something happen to your Facebook page? Was it re-named or deleted? Because it looks like the ID of your Facebook page might have been changed or something, and a simple fix there could fix the entire problem.

    Thread Starter imaginocracy

    (@imaginocracy)

    So because I am using a custom post type you need to add the ‘post_type’ argument to the new WP_Query in addition to the category name. The other issue is that I was calling the meta box by div ID not by the actual meta ID.

    Resolved!

    <main>
     <div class="row">
      <div class="span8 menu-entry dinner-menu paddedLR">
      <h1 class="menu-title">Savannah's Dinner Menu</h1>
      <h2 class="menu-sub-head">Appetizers</h2>
        <?php // Appetizers
        $the_query = new WP_Query( array( 'post_type' => 'dishes', 'category_name' => 'appetizer' ));
    
        // The Loop
        if ( $the_query->have_posts() ):
        while ( $the_query->have_posts() ) :
            $the_query->the_post(); ?>
        <div class="menu-item-wrapper appetizer-item">
        <h2 class="menu-item-title"><?php the_title(); ?></h2>
        <?php the_content(); ?>
    
        <span class="price">
          <?php
          $price_value = get_post_meta($post->ID, 'PRICE_text', true);
          if ( ! empty( $price_value ) ) {
            echo $price_value;
          }
          ?>
        </span>
      </div><!--/.appetizer -->
       <?php endwhile; endif;
    
       wp_reset_postdata(); ?>
    
       <h2 class="menu-sub-head">Soups & Salads</h2>
       <?php // Soups & Salads
        $query2 = new WP_Query( array( 'post_type' => 'dishes', 'category_name' => 'soups-and-salads' ));
    
        // The Loop
        if ( $query2->have_posts() ):
        while ( $query2->have_posts() ) :
            $query2->the_post(); ?>
    
        <h2><?php the_title(); ?></h2>
        <p class="item-description"><?php the_content(); ?></p>
        <p class="price">
          <?php
          $price_value = get_post_meta($post->ID, 'PRICE_text', true);
          if ( ! empty( $price_value ) ) {
            echo $price_value;
          }
          ?>
        </p>
    
        <?php endwhile; endif;
    
       wp_reset_postdata(); ?>
    
      </div>
     </div>
    </main>
    Thread Starter imaginocracy

    (@imaginocracy)

    Alright, yeah worked like a charm, thanks for the assist!

    Thread Starter imaginocracy

    (@imaginocracy)

    Ok thanks, yeah it stripped my a content off. I’ll try this.

    Thread Starter imaginocracy

    (@imaginocracy)

    Hey, this is pretty close, or perhaps I did something wrong. Here is the code in entirety:w

    <?php $count  = 0;
    query_posts('cat=21');
    if(have_posts()) : while(have_posts()) : the_post();
    //open the wrapper div for three posts//
    if( $count%3 == 0 ) echo "\n".'<div class="row">';
    
    $open = !($count%1) ? '<div class="span4 portfolio-item">' : '';
        	$close = !($count%1) && $count ? '</div>' : '';
        	echo $close.$open;
    ?>
    
    <div class="loopcontent">
            <a>">
    			<?php
    				if ( has_post_thumbnail() ) {
    					the_post_thumbnail('full');
    				} else {
    					// the current post lacks a thumbnail
    				}
    ?></a>
                    <h2><a>"><?php the_title(); ?></a></h2>
    				<?php the_excerpt(); ?>
            </div>
    
    <?php
    //close the wrapper div for three posts//
    if( $count%3 == 2 ) echo "\n".'</div><!-- .row -->';
    $count++;
    endwhile;
    //close the wrapper div if less than three posts//
    if( $count%3 != 0 ) echo "\n".'</div><!-- .row -->';
    endif;
    ?>

    This produces the following markup:
    https://imgur.com/t8uZBGa

    You can see the first 3 items fall in line perfectly, wrapped in row-fluid as should be.

    Then row-fluid opens again and closes and then the 4th item is placed outside the wrapper div.

    I’m stuck as to why it’s doing that.

    Can you try togglng the FTP between active and passive mode under preferences? Sometimes that helps to clear up FTP issues. The file has to be there.

    Else, can you navigate to the file name by copy/pasting the URL in the browser? If not, then you have a bad link.

    Hi Sam,

    Page.php resides in your theme files. It would be overwritten from a theme update, not a WordPress update. You should create a child theme and edit it from there if your theme developer supplies updates for you.

    Hi,

    Those are actually images one of which is located at:

    https://kaydeegroup.com/furniture/wp-content/themes/angular-theme/js/prettyPhoto/images/prettyPhoto/default/sprite_next.png

    Access your FTP and upload a re-sized image called sprite_next.png to that directory to replace the image. Do the same thing for the other image files you want to change.

    Hi Mamphey,

    Try putting this:

    <?php comments_template(); ?>

    Where you want the comment box to be in the page.php file.

Viewing 15 replies - 1 through 15 (of 19 total)