Custom Blog Post Listing in Genesis Sample Child Theme

You are going about this pretty much all wrong. You should read the instructions before continuing. An Introduction to Child Themes An Introduction to Hooks in the Genesis Framework for WordPress The second code you provided can be rewritten as this: // Template Name: Page Template genesis(); That’s it. Genesis takes care of all that … Read more

Full width layout for custom post type pages

Since you are using Genesis, why don’t you just use the Layout that doesn’t contain Primary Sidebar? The layout option should be available right below the editor (as a meta box). If you still need code, use plain CSS to remove the sidebar area. function remove_primary_sidebar() { //Only if Pages with the following IDs if … Read more

Help with CPT template pagination

there is no need to handle the pagination like this: $paged = get_query_var( ‘paged’, 1 ); Just put this after the loop: get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => ‘&nbsp;’, ‘next_text’ => ‘&nbsp;’, ‘screen_reader_text’ => ‘A’ ) like this: if( have_posts() ){ while( have_posts() ){ the_post();?> the_content();?> <?php } echo get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => … Read more

Including Custom Post Type posts in a page template contextually (or should I widget?)

Custom Archive Page What you’re describing is a custom archive page. https://www.google.com/search?q=custom+archive+page https://codex.wordpress.org/Creating_an_Archive_Index Child Theme Forget widgetised areas. They’re not necessary based on what you described. Simply fork (copy and manipulate) your archives template page by using using a child theme rather than directly editing the parent theme (edits won’t survive theme updates). https://codex.wordpress.org/Child_Themes Featured … Read more

how to change link of some wordpress pages

Create a blank page and name it panel then go to your created signup template and select parent page panel. Its just below Publish->Page Attributes. /*Add noindex to this page (Add to functions.php)*/ function add_noindex_tags(){ # Add noindex to page. if( is_page(‘panel’) ) echo ‘<meta name=”robots” content=”noindex,nofollow”>’; } add_action(‘wp_head’,’add_noindex_tags’, 4 );

Dequeue theme stylesheets but keep widget styling on custom page template

You would have to enqueue them at the same time you dequeue all the other items, assuming your widgets have separate stylesheets. You can’t selectively enqueue sub-portions of a stylesheet, and there is no method of identifying which stylesheets contain the widgets. Depending on the theme the widgets may not be in their own stylesheet, … Read more

Taxonomy page template changing when using query variables

The problem is that category_name is a reserved keyword for the built-in categories for posts. Almost anything category_* is reserved. You can find a list of reserved keywords at the following url: https://codex.wordpress.org/Reserved_Terms This includes, but is not limited to: cat category category__and category__in category__not_in category_name term terms Behind the scenes it sees that you’re … Read more

Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore

I was mistaken. The underscores are required by the template-files if they are part of the custom-post-type’s handle. Make sure to flush the rewrite cache / visit the permalinks page when working with cpt templates The archive.php template the missing cpt-template was falling back to looked similar Following wp-includes/template-loader.php >> get_post_type_archive_template >> get_archive_template doesn’t look … Read more

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