Forum Replies Created
-
AuthorPosts
-
August 1, 2019 at 2:03 am in reply to: "Call to undefined function genesis_before_post()" errormessage #492707
michaeloeser
MemberIs there anyone who can assist with the custom loop. Doesn´t have to be for free.
August 1, 2019 at 1:45 am in reply to: "Call to undefined function genesis_before_post()" errormessage #492705michaeloeser
MemberThank you guys for your help.
My issue is I´m much more of a designer than a coding guy but I will see what I can do.
July 25, 2019 at 11:51 pm in reply to: "Call to undefined function genesis_before_post()" errormessage #492583michaeloeser
MemberEven if I swap e.g. genesis_before_post() with genesis_before_entry(), I get "Call to undefined function genesis_before_entry()".
See: https://www.car-it.com/category/news
I don´t know exactly which old function to swap with which new one. That´s why I asked for a sort of table that says something like "this is the old function A and this is the new function A" etc.
I´m using a custom child theme.
July 24, 2019 at 2:36 am in reply to: "Call to undefined function genesis_before_post()" errormessage #492533michaeloeser
MemberOk this is the whole code of the category.php file.
Error see: https://www.car-it.com/category/news<?php /** * Category Template - generic */ /** * Prevent direct access to this file. * * @since 1.0.0 */ if ( ! defined( 'WPINC' ) ) { exit( 'Sorry, you are not allowed to access this file directly.' ); } remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'dp_amtv_category_generic_loop_helper' ); /** * Add custom loop helper for "Big Data" category. */ function dp_amtv_category_generic_loop_helper() { ?> <?php $i=1; if (have_posts()) : while (have_posts()) : the_post(); // the loop ?> <?php genesis_before_entry(); /////genesis_before_post(); ?> <div <?php post_class(); ?>> <?php /////genesis_before_post_title(); ?> <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php /////genesis_after_post_title(); ?> <?php /////genesis_before_post_content(); ?> <div class="entry-content"> <?php if(genesis_get_option('content_archive') == 'full') : the_content(__('[Read more...]', 'genesis')); else : if(genesis_get_option('thumbnail')) genesis_image(array('format' => 'html', 'size' => genesis_get_option('image_size'), 'attr' => array('class' => 'alignleft post-image'))); the_excerpt(); endif; ?> </div><!-- end .entry-content --> <?php /////genesis_after_post_content(); ?> <?php if($i == 2 ) : ?> <!-- Banner 1 --> <?php // Include the content ad format 1st position on archives if ( !is_category ( array ('t-systems-subnet','plm','siemens-subnet') ) ) { include(CHILD_DIR.'/inc/category-ad.php'); } ?> <?php elseif ($i == 4 ) : ?> <!-- Banner 2 --> <?php // Include the content ad format 2nd position on archives if ( !is_category ( array ('t-systems-subnet','plm') ) ) { include(CHILD_DIR.'/inc/category-ad2.php'); } ?> <?php elseif ($i == 6 ) : ?> <!-- Banner 3 --> <?php // Include the content ad format 3rd position on archives if ( !is_category ( array ('t-systems-subnet','plm') ) ) { include(CHILD_DIR.'/inc/category-ad3.php'); } ?> <?php /* elseif ($i == 8 ) : ?> <!-- Banner 4 --> <?php // Include the content ad format 4th position on archives if ( !is_category ( array ('t-systems-subnet','plm') ) ) { include(CHILD_DIR.'/inc/content-ad4.php'); } */?> <?php endif; ?><!-- end if Abfrage für Banner --> </div><!-- end .postclass --> <?php /////genesis_after_post(); ?> <?php $i++; endwhile; // end of one post ?> <?php /////genesis_after_endwhile(); ?> <?php else : // if no posts exist ?> <?php /////genesis_loop_else(); ?> <p><?php _e('Sorry, no posts matched your criteria.', 'genesis'); ?></p> <?php endif; // end loop ?> <?php } // end function /** * Let Genesis take over again */ genesis();
July 24, 2019 at 2:10 am in reply to: "Call to undefined function genesis_before_post()" errormessage #492531michaeloeser
MemberI get "Call to undefined function genesis_before_entry()"
See: https://www.car-it.com/category/news
Do I have to change any else setting?
July 24, 2019 at 1:55 am in reply to: "Call to undefined function genesis_before_post()" errormessage #492529michaeloeser
MemberIt´s some old function(s) obviously
genesis_before_post()
genesis_before_post_title()
genesis_before_post_content()
genesis_after_post_content()
genesis_after_post()
genesis_after_endwhile()
genesis_loop_else()I assume there must be some newer function to replace them.
michaeloeser
MemberHi Brad,
sorry for my late reply but I was quite busy in the last couple of days.
My "problem" is I do not use the default Genesis loop at all. I use a custom loop. And by removing the default loop the pagination gets removed also
remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'dp_amtv_loop_archive_marketplace' );
After that I go on with
function dp_amtv_loop_archive_marketplace() { ?> <?php // the query $args = array( 'post_type' => 'marketplace', 'post_status' => 'publish', 'posts_per_page' => 10 ); $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) : ?> <!-- pagination here --> <!-- the loop --> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <!-- include the archive page output --> <?php include( CHILD_DIR . '/inc/marketplace-stuff-archive.php' ); ?> <?php endwhile; ?> <!-- end of the loop --> <!-- pagination here --> <?php wp_reset_postdata(); ?> <?php else : ?> <p><Nothing found...</p> <?php endif; ?> <?php } // end function ?>
I want the pagination where it says <!-- pagination here -->
That´s why I mean there must be some kind of code snipped for that (hopefully)
Any suggestions?
Cheers
Michaelmichaeloeser
MemberHey Brad,
I figured everything out now except one simple thing. I created my own custom loop and that works. What currently not works is the default genesis page navigation at the end of a (archive) page. I´m talking about this "1,2,3...next page" navigation on the bottom of a default archive page (e.g http://www.automotiveit.eu/category/news) and I want to have that here as well: http://www.automotiveit.eu/marketplace
Of course it can´t work because my loop doesn´t "know" about it and I assum I need to add it to my loop. But where can I find it how does it look? Is there a piece of code that I can add to my loop which outputs the default Genesis paging?
Thanks
Michaelmichaeloeser
MemberThanks. Will take a look at it
michaeloeser
MemberYes and some extra text possibly. Sounds like problem?
michaeloeser
MemberI want to list the entries of that CPT marketplace on the archive page (http://www.automotiveit.eu/marketplace) in the form of showing several custom fields (like logo, some text etc.) as well as tags for each entry.
A bit as shown in this screenshot (not exactly but similar)
http://dl.dropbox.com/u/4814298/archive-IT4automotive.jpgSo I need to modify the loop of the CPT marketplace archive page which currently uses the default loop.
michaeloeser
MemberIt´s custom child theme based on the default Genesis theme. Nothing spectacular.
michaeloeser
MemberYOU made my day!
Works brilliant. Thanks a lot
Cheers
Michaelmichaeloeser
MemberThank you so much. That works perfect.
michaeloeser
MemberThanks. I will check it out.
michaeloeser
MemberWhat I´ve done so far is this:
I added this to the child themes functions file:
/** Code for custom loop */ function alfons_custom_loop() { ?> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>"> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content("Continue reading " . get_the_title()); ?> </div><!-- .entry-content --> <footer class="entry-footer"> </footer><!-- .entry-footer --> </article><!-- #post-## --> <p>TEST</p> <?php comments_template(); ?> <?php endwhile; ?> <?php }
removed the default loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
and call the custom loop function in a php enabled widget. It works except the comments. It shows the title and the content but no comment form and no comments.
Any ideas?
This is the site: http://www.thank-you-alfons.de/
michaeloeser
MemberThanks David. I guess that already helps me.
Cheers
Michaelmichaeloeser
MemberStill XHTML on this site
michaeloeser
MemberAwesome. Works now. But the genesis_after_entry hook seems to be invalid. I used genesis_after_post_content and it works.
Thanks
Michaelmichaeloeser
MemberHmmm...not quite. When I do this in home.php
<?php remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'eleven40_grid_loop_helper' ); /** Add support for Genesis Grid Loop */ function eleven40_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 1, 'feature_image_size' => 0, 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => 'thumbnail', 'grid_image_class' => 'alignleft', 'grid_content_limit' => 150, 'more' => __( '[Continue reading]', 'genesis' ), ) ); } else { genesis_standard_loop(); } } function eleven40_after_featured() { genesis_widget_area( 'ad-homepage-only', array( 'before' => '<div class="ad-homepage-only widget-area">', ) ); } genesis();
It displays the widget area before the first (featured) post. I want it right after this post.
Ideas?
-
AuthorPosts