Displaying Custom Fields on Post with Genesis Child Theme

How about instead of genesis_custom_field(‘instrument’); use: echo genesis_get_custom_field(‘instrument’); Plus the genesis_after_post_title action hook is deprecated since 1.7.0 and you should use genesis_entry_header with correct priorities. For more information please use the reference links below. Reference: genesis_after_post_title Genesis 2.0 Hooks reference

htaccess: Remove trailing slash from URL ending with .xml/ only

If you’re outputting a sitemap, there’s no reason to wait for the query for your page- which is what is producing the redirect. Hook an earlier action and you won’t need anything to counter the trailing slash, because it won’t happen- EDIT Here’s a complete version with registering query vars, rules, and parse_request action: // … Read more

StudioPress: add meta tag to every page [closed]

This function should take care for the input into the head of each page/post as asked. Please make a copy of functions.php before adding following code.Adjust to your own preferences if needed. /** * Add meta to head * * Read more {@link https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head} * @version WordPress 4.8 */ function wpse272951_wsm_keep_ie_modern() { echo “<meta http-equiv=\”X-UA-Compatible\” … Read more

Editing or filtering the output of the Genesis navigation

You could try to use the wp_nav_menu_args filter (untested): /** * Add the Menu_With_Data_Attr walker to the wp_nav_menu() used by genesis_do_nav() */ add_filter( ‘wp_nav_menu_args’, function( $args ){ if( isset( $args[‘menu_class’] ) && ‘menu genesis-nav-menu menu-primary’ === $args[‘menu_class’] ) { if( class_exists( ‘Menu_With_Data_Attr’ ) ) { $args[‘walker’] = new Menu_With_Data_Attr(); } } return $args; }); to … Read more

Adding ads after a certain number of paragraphs within Genesis themework

I’ve found explode() to be useful when trying to break strings apart. This code creates an array of paragraph chunks, inserts the new block after two paragraphs and concatenates it back into a string for output. function insert_ad_block( $text ) { if ( is_single() ) : $ads_text=”<div class=”wpselect_middle_content”>My Ad Code Here</div>”; $split_by = “\n”; $insert_after … Read more

How to remove an action added by a child theme of Genesis

Thanks to Dan that commented with a useful post I found on Google but didn’t read with the required attention, the solution is this: function my_remove() { remove_action( ‘genesis_entry_header’, ‘shq_genestrap_post_meta_categories’, 9 ); } add_action(‘genesis_entry_header’, ‘my_remove’, 8); Using priority 9 in add_action() doesn’t work: I had to set a priority lower than the one used to … Read more

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