Getting Genesis Entry Headers Back on Post Tiltes
Getting Genesis Entry Headers Back on Post Tiltes
Getting Genesis Entry Headers Back on Post Tiltes
No idea if this makes a difference, and don’t know about the Genesis either but give it a shot function excerpt_read_more_link($output) { global $post; if ( ‘speaker’ == get_post_type() ) { $output .= ‘<p><a class=”speaker-more-link” href=”‘. get_permalink() . ‘”>View Speaker Profile</a></p>’; } elseif ( ‘resources’ == get_post_type() ) { $output .= ‘<p><a class=”speaker-more-link” href=”‘. get_permalink() … Read more
pre_get_posts filters will be applied to all queries on a page- the main query, menus, and additional WP_Query instances. To target only the main query, use is_main_query(): function my_pre_get_posts( $query ) { // bail early if is in admin // or if query is not main query if( is_admin() || !$query->is_main_query() ) { return; } … Read more
Thanks Kerzzy, This worked more or less, though I needed to add this right after the opening php tag: /** * * Template Name: Change Password Template */ // fix buffering issue ob_start(); I encountered two issues and the above code fixed those problems. I couldn’t set my page to use this new template without … Read more
Adapting functions from Genesis theme
Completely mess, but this solved my issue <?php function be_custom_loop() { $category = get_category(get_query_var(‘cat’)); $cat_id = $category->cat_ID; $cat_name = $category->name; echo ‘<div class=”home_title”>’ . $cat_name . ‘</div>’; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args = array( ‘cat’ => $cat_id, ‘paged’ => $paged ); query_posts($args); // The Loop while (have_posts()) : the_post(); $post_thumb = str_replace(home_url(), … Read more
Something like this should work- if( get_post_meta( $post_id, ‘_surl_post_id’, true ) ) { // we have an old post created here update_post_meta( get_post_meta( $post_id, ‘_surl_post_id’, true ), ‘_surl_redirect’, get_post_meta( $post_id, ‘url’, true ) ); return; } // Prepare contents $add_cpt_clone = array( ‘post_title’ => $post_object->post_title, ‘post_status’ => ‘publish’, ‘post_type’ => ‘surl’ ); // Insert the … Read more
Those actions always get called by the Genesis framework. I mean these are hook positions and they are always fired by genesis so that any functions tagged/hooked to those hooks will be called at those locations.. so it will always be 1 i.e. yes action hook was executed. As discovered rightly by OP, using has_action … Read more
Within your Executive Pro theme’s functions.php, you can add a function that filters the post info. In Genesis lib/functions/post.php, you’ll find a genesis_post_info() function, and one particular line in it is: $filtered = apply_filters( ‘genesis_post_info’, ‘[post_date] ‘ . __( ‘by’, ‘genesis’ ) . ‘ [post_author_posts_link] [post_comments] [post_edit]’ ); That means you can filter genesis_post_info, and … Read more
I figured it out after reviewing the code reference for is_singular some more. Here is the final code: add_action( ‘genesis_entry_footer’, ‘dr_prev_next_post_nav’ ); function dr_prev_next_post_nav() { genesis_markup( array( ‘html5’ => ‘<div %s>’, ‘xhtml’ => ‘<div class=”navigation”>’, ‘context’ => ‘adjacent-entry-pagination’, ) ); if ( is_singular( array( ’employees’ ) ) ) { echo ‘<div class=”pagination-previous one-half first alignleft”>’; … Read more