Select full Image Size on widget “Genesis – Featured Posts”

If you replace genesis_get_additional_image_sizes(); with genesis_get_image_sizes() you can choose any size image for the widget thumbnail. Replacement featured-post-widget.php is available on GitHub. And here is the replacement code: $sizes = genesis_get_image_sizes(); foreach( (array) $sizes as $name => $size ) echo ‘<option value=”‘.esc_attr( $name ).'” ‘.selected( $name, $instance[‘image_size’], FALSE ).’>’.esc_html( $name ).’ ( ‘.$size[‘width’].’x’.$size[‘height’].’ )</option>’;

Problem with WordPress query on page using custom fields

Edit :// try this: <?php add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ ); function sk_display_custom_fields() { /*Wordpress loop*/ global $wp_query; query_posts(array( ‘post_type’ => ‘sammenligne’ )); while(have_posts()) : the_post(); ?> $navn = get_field( ‘navn’ ); $type = get_field( ‘type’ ); echo ‘<p>’,$navn , ‘__’, ‘$type’,'</p>’); endwhile; wp_reset_query(); } add_action( ‘genesis_entry_header’, ‘sk_display_custom_fields’ ); genesis(); UPDATE:// Ok I tested ACF’s now. With … Read more

add_action and remove_action if custom field exists

I’m not clear on how your code works as-is, as I mentioned in my comment. It looks like you’re adding an action to call a function inside the function that you want to call with that action. If nothing outside the function invokes it, it never runs. add_action( ‘template_redirect’, ‘check_breadcrumb_condition’ ); function check_breadcrumb_condition(){ global $post; … Read more

Genesis: How to add content after aside and before the content-sidebar wrap

If you look in lib/structure/layout.php, towards the bottom, you’ll see: add_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ ); /** * Output the sidebar.php file if layout allows for it. * * @since 0.2.0 * * @uses genesis_site_layout() Return the site layout for different contexts. */ function genesis_get_sidebar() { $site_layout = genesis_site_layout(); //* Don’t load sidebar on pages that don’t … Read more

Custom Post Type Loop throws 500 error when used in widget

There are several problems in your provided code. $query -> while( have_posts() ) The WP_Query() return type is object. You are referring to a method that doesn’t exist. Instead, you should use the following: while( $query->have_posts() ) {…} wp_reset_postdata(); inside the conditional This function resets the post’s data, as it suggests. If you use it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)