Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1136073

    bezambar
    Participant

    Would you mind giving me an example of how that look, right now the only thing in the file are like hooks and liked reference hooks. Do I get rid of those and input hooks for the data I need displayed or the actual php for getting the information and then displaying it?

    #1136419

    Rad
    Moderator

    Hi there,

    Just an example, 🙂

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/CONTENT-PRODUCT.PHP
    // -----------------------------------------------------------------------------
    // Standard post output for Integrity.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
        <?php 
    
    //Display image
    x_featured_image();
    
    ?>
      </div>
      <div class="entry-wrap">
        <?php 
    
    //Display product title
    x_get_view( 'integrity', '_content', 'post-header' );
    
    //Display product description     
    the_excerpt();
    
    $product = new WC_Product(get_the_ID());
    
    //Display product price
    echo $product->get_price_html();
    
    //Display SKU
    echo $product->get_sku();
    
    ?>
    
      </div>
      <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
    </article>

    It depends on you on how you’ll arrange these, you should re-arrange it according to your preferred design and layout.

    Cheers!

    #1137494

    bezambar
    Participant

    Hi thank you for help, however, can you take a look at the search page of my site. The results appear as huge featured images and the description underneath, even with the modifications presented in this thread, nothing has changed.

    bezambar.com

    #1137833

    Rue Nel
    Moderator

    Hello There,

    Do you want to display the search page in a masonry layout? If that’s the case, since you have your child theme active and ready, please follow the following steps below:
    1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
    2] Insert the following code into that new file

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_INDEX.PHP
    // -----------------------------------------------------------------------------
    // Includes the index output.
    // =============================================================================
    
    $stack = x_get_stack();
    
    if ( is_home() ) :
      $style     = x_get_option( 'x_blog_style' );
      $cols      = x_get_option( 'x_blog_masonry_columns' );
      $condition = is_home() && $style == 'masonry';
    elseif ( is_archive() ) :
      $style     = x_get_option( 'x_archive_style' );
      $cols      = x_get_option( 'x_archive_masonry_columns' );
      $condition = is_archive() && $style == 'masonry';
    elseif ( is_search() ) :
      $style     = x_get_option( 'x_archive_style' );
      $cols      = x_get_option( 'x_archive_masonry_columns' );
      $condition = is_search() && $style == 'masonry';
    endif;
    
    ?>
    
    <?php if ( $condition ) : ?>
    
      <?php x_get_view( 'global', '_script', 'isotope-index' ); ?>
    
      <div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">
    
        <?php if ( have_posts() ) : ?>
          <?php while ( have_posts() ) : the_post(); ?>
            <?php if ( $stack != 'ethos' ) : ?>
              <?php x_get_view( $stack, 'content', get_post_format() ); ?>
            <?php else : ?>
              <?php x_ethos_entry_cover( 'main-content' ); ?>
            <?php endif; ?>
          <?php endwhile; ?>
        <?php else : ?>
          <?php x_get_view( 'global', '_content-none' ); ?>
        <?php endif; ?>
    
      </div>
    
    <?php else : ?>
    
      <?php if ( have_posts() ) : ?>
        <?php while ( have_posts() ) : the_post(); ?>
          <?php x_get_view( $stack, 'content', get_post_format() ); ?>
        <?php endwhile; ?>
      <?php else : ?>
        <?php x_get_view( 'global', '_content-none' ); ?>
      <?php endif; ?>
    
    <?php endif; ?>
    
    <?php pagenavi(); ?>

    3] Save the file named as _index.php
    4] Upload this file to your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/global/

    Hope this helps.

    #1138706

    bezambar
    Participant

    Hey, sorry for troubling you guys so much. So the masonry formatting kind of worked, but now no results show up on the second page and some images are huge on other pages.

    I’m very lost as to how to properly format the search page, it may be some conflict or something else that is incorrectly formatted but the search page is causing me no small amount of problems, and is very important function of the site.

    I would like there to be 4 columns of results. Also I i would like for post and pages to only display the featured image, the title, and the meta description, because at the moment its displays things that shouldn’t be ‘viewable’ by the user.

    Also I followed your directions on displaying the product results but it still only shows the image and product description despite my alterations of the content-product file.

    #1139079

    Rue Nel
    Moderator

    Hello There,

    The masonry layout is not working properly. Please also add this custom code in your child theme’s functions.php file to correct it.

    function add_hentry_class($classes){
      if ( x_is_product() ) {
        $classes[] = 'hentry';
      }
    
      return $classes;
    }
    add_filter('post_class', 'add_hentry_class');

    And to better assist you, would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password
    – FTP Hostname
    – FTP Username
    – FTP Password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1139168

    Richard
    Participant

    Thank you Bezambar for the plug-in recommendation earlier and Themeco for the suggestions. I’m off to other issues and will need to come back to this. Good Luck Bezambar…

    #1139219

    Rad
    Moderator

    You’re welcome, Richard!

    #1139724

    bezambar
    Participant
    This reply has been marked as private.
    #1140133

    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the details. Regretfully the given password for the WP dashboard is not working for us.

    I’d also recommend that you clear your caching plugin, and disable it during development. This can cause Customizer changes to not take place on the front end. It will eventually show up when the cache regenerates, but it’s not ideal if you’re looking to see your changes immediately. Caching plugins are best to turn on only when you’ve finished building the site.

    Please let us know how it goes.

    #1142063

    bezambar
    Participant
    This reply has been marked as private.
    #1142775

    Paul R
    Moderator

    Hi,

    Unfortunately, the login provided is still not working.

    Kindly check again and let us know.

    Thanks

    #1143583

    bezambar
    Participant
    This reply has been marked as private.
    #1144233

    Paul R
    Moderator

    Hi,

    Sorry, but it is still not working.

    http://screencast.com/t/FcoEOuyi5EA5

    I tried typing and copying the password.

    Do you have any ip restriction set in your server?

    Thanks

    #1145320

    bezambar
    Participant

    Sorry, we’ve been switching to another host so the password changes and new users weren’t being transferred over. Soooo it should work now hopefully. Sorry for all the trouble