WordPress codex for page
How to get the current page slug?
global $post; $slug = get_post( $post )->post_name;
Option 1 add_filter( 'genesis_pre_get_option_site_layout', 'genesiscustomlayout' ); function genesiscustomlayout(){ $pageobj = get_queried_object(); $pageid = absint($pageobj->ID); $pagelayout = get_post_meta($pageid , "_genesis_layout" , true); return $pagelayout; } Option 2 This function is to forced your custom post type content layout to full width. Common post type is post, page, and product ( woocommerce plugin pages ) and etc….
All of the codes below will be place on your function.php Change number of products displayed per page add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 1000;' ), 20 ); Archive columns global $woocommerce_loop; $woocommerce_loop['columns'] = 4; // Change the product category list column to 4. Archive columns with body class add_filter('body_class','archive_columns'); function archive_columns($classes) { global $woocommerce_loop; $classes[]…
Collection of Genesis header hooks and customization’s How to remove page title? add_action('get_header','remove_title'); function remove_title(){ remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); }
How to get current post/page/custom post type post data (ID, Post Name, Post Title, Etc.) in init action? If you have something to get in your current page and don’t know how to get the current post ID, post name, post type, post content, and many more, the codes below is the solution. Using init…
This domain has been suspended due to non-completion of an ICANN-mandated contact verification. As part of the ongoing effort to improve contact quality, the Internet Corporation for Assigned Names and Numbers (ICANN) requires validation for each registrant contact registering a generic TLD. This is required since January 1, 2014 for all gTLDs. Ok, the text…
How to fix this kind of error? This is showing on your console of a browser. adsbygoogle.js:35 Uncaught TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them. With this codes below, your problem is solve. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> jQuery(document).ready(function($){ $('ins').each(function(){ (adsbygoogle = window.adsbygoogle || []).push({}); }); });…