Forum Replies Created

Viewing 15 replies - 91 through 105 (of 108 total)
  • Hallo Richard,

    Still playing arround with some code! For now i have pagination working for custom pages… Maybe you can extend on the following code! I don’t have the search function working as of yet!

    Here is the code!

    <?php get_header();
    
    /**
     * Template Name: listing
    **/
    
     ?>
    
    <?php 
    
      $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    
      $custom_args = array(
          'post_type' => 'wpcm_vehicle',
          'posts_per_page' => 2,
          'paged' => $paged
        );
    
      $custom_query = new WP_Query( $custom_args ); ?>
    
      <?php if ( $custom_query->have_posts() ) : ?>
    
        <!-- the loop -->
        <?php while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?>
          <article class="loop">
            <?php echo get_the_post_thumbnail( $page->ID, 'thumbnail' ); ?>
            <a href="<?php the_permalink() ?>"><h3><?php the_title(); ?></h3></a>
    	<li class="wpcm-price"><?php $price = get_post_meta($post->ID, 'wpcm_price', true); ?> <?php echo $price; ?></li>
    	<li><?php $mileage = get_post_meta($post->ID, 'wpcm_mileage', true); ?> <?php echo $mileage; ?></li>
    	<li><?php $frdate = get_post_meta($post->ID, 'wpcm_frdate', true); ?> <?php echo $frdate; ?></li>
    	<li><?php $engine = get_post_meta($post->ID, 'wpcm_engine', true); ?> <?php echo $engine; ?></li>
            <div class="content">
              <?php the_excerpt(); ?>
            </div>
          </article>
        <?php endwhile; ?>
        <!-- end of the loop -->
    
        <!-- pagination here -->
        <?php
          if (function_exists(custom_pagination)) {
            custom_pagination($custom_query->max_num_pages,"",$paged);
          }
        ?>
    
      <?php wp_reset_postdata(); ?>
    
      <?php else:  ?>
        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
      <?php endif; ?>
    
    <?php get_footer(); ?>

    Offcourse you need to style the elements to match your website.

    U can use this for the time being! Now lets wait for a plugin update where pagination is fully working ??

    Patrick

    Hallo,

    Please note this is just an example! I’m not a professional coder…

    This should work inside the loop… Have used this in a custom template!

    Example for mileage

    <?php $mileage = get_post_meta($post->ID, 'wpcm_mileage', true); ?> <?php echo $mileage; ?>

    I hope this helps to acomplish what you need!

    Thread Starter Patrick

    (@zaanmedia)

    Ook i get the feed to work now… feed/?post_type=wpcm_vehicle

    Following is in the feed.

    title
    link
    pubDate
    Creator
    permalink
    desscription

    I want to have 2 sites with the same occasions with the post to feed option that works for custom post type. What i need is full feed of information and images!

    not sure if the feed to post can get more information if it follows the feed but i guess will give it a try soon!

    Patrick

    (@zaanmedia)

    Please note! Not tested

    Go to src/Vehicle/Data.php line 124, 125:

    And change the lines to…

    Example:

    'semi automatic' => __( 'Semi Automatic', 'wp-car-manager' ),
    'automatic' => __( 'Automatic', 'wp-car-manager' ),
    'manual'    => __( 'Manual', 'wp-car-manager' )

    The term tiptronic is from porsche and some other makes are using this name but changed it to semi-automatic in the example because i think it’s the right term to use!

    Kind Regards,
    Patrick

    Patrick

    (@zaanmedia)

    Hallo Richard,

    I did have a look at the code to figure it out my self but it seems they don’t use simple a wp query to load the results… or at least i can’t figure it out!

    I’m not a proffesional when it comes to coding but a simple post query should be easy to add x listings per page if i’m not wrong? Don’t think the plugin is not made this way!

    Hope they can sort it out and maybe include it in a next release.

    Like to see this options as well! I also like a plugin like to have the combined options from post limit and pay per post.

    @plugincentral are you for hire to build this kind of stuff?

    Also it would be nice to have an invoice system as well so clients can view theire transactions.

    And for the admins it would be awesome than if we can add tax rates and make export’s of the sales per quarter! and ofcouse custom invoice numbers like this 201500001 for example.

    So we can export all processed payments in for example Q1 2016 (Jan-Mar), Q2 2016 (Apr-Jun) etc. etc. for administration purposes.

    What about documentation for developers for creating or adding payment gateway plugins for pay per post plugin. I like to have multiple payments options for my clients.

    All of this stuff could be premium plugins and a lot of people looking for this with a company.

    I also love to see the option to limit by total posts.

    Thread Starter Patrick

    (@zaanmedia)

    Awesome! Thanks for the updates and help… Changed the plugin in 5stars

    Thread Starter Patrick

    (@zaanmedia)

    I see my bad! Ook that is working fine now…

    Thread Starter Patrick

    (@zaanmedia)

    And some other issue somehow the description is not showing in the blocks!

    I can confirm i have the same problem in the sitemap!

    Yourdomain.com/products
    Yourdomain.com/de/products needs to be Yourdomain.com/de/produkte
    Yourdomain.com/es/products needs to be Yourdomain.com/es/productos

    Hope someone will find an solution for this!?

    Regards,
    Patrick

    Patrick

    (@zaanmedia)

    I also got the same errors? Is there any solutions for this problem?

    Thanks

    Thread Starter Patrick

    (@zaanmedia)

    Thank Martin,

    Everything is working again.

    Patrick

    Thread Starter Patrick

    (@zaanmedia)

    Hallo martin,

    Thanks for the reply but not working.

    Thanks for the help so far.

    Patrick

    Thread Starter Patrick

    (@zaanmedia)

    It’s on my localhost. I use this template:

    https://github.com/natejones/DigitalSignageWordpress

    This line if jquery for theme: <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js' type='text/javascript' charset='utf-8'></script>

    I see if i remove the jquery loaded from the theme it’s working but than the theme does not work?

    I’m totally noob with js or jquery.

    Thanks

Viewing 15 replies - 91 through 105 (of 108 total)