Forum Replies Created
-
AuthorPosts
-
wpsmithMemberwpsmithMember
Yes, you can do this. I had to this for a client site back not too long ago. You can do this one of two ways:
First, you can filter what's already there:
add_filter( 'genesis_seo_title', 'wps_seo_title', 10, 3 );
/**
* Modify the Genesis SEO Title.
*
* @param string $title Default HTML title output.
* @param string $inside HTML blog name output.
* @param string $wrap h1 or p based on settings.
* @return string $title Modified HTML title output.
*/
function wps_seo_title( $title, $inside, $wrap ) {
// do something using <span> tags to manipulate your colors
return $title;
}
Second, remove the Genesis default and roll your own. Doing it this way will render the Homepage Settings in the SEO Settings pointless unless you build in the same logic.
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
add_action( 'genesis_site_title', 'wps_seo_site_title' );
/**
* Echo the site title into the header.
*/
function wps_seo_site_title() {
//do something, output some HTML
}
wpsmithMemberHello lauraM,
Try this in functions.php:
add_filter( 'genesis_nav_items', 'be_follow_icons', 25, 2 );
add_filter( 'wp_nav_menu_items', 'be_follow_icons', 25, 2 );
/**
* Follow Icons in Menu
* @author Travis Smith
* @author Bill Erickson
* @link http://www.billerickson.net/genesis-wordpress-nav-menu-content/
*
* @param string $menu HTML menu output.
* @param array $args Array of nav menu arguments.
* @return string HTML menu output.
*/
function be_follow_icons($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] ) // Change this to the nav menu location
return $menu;
// Change this below. In case you do not know the text is written for translation.
// If you don't need translation, you can use this: $phone = '<li id="phone">Call us: 999-999-9999</li>';
$phone = '<li id="phone">' . __( 'Call us', 'child-domain' ) . ': 999-999-9999</li>';
return $menu . $phone;
}
December 27, 2012 at 3:47 pm in reply to: Need Help Displaying Manual Excerpts for Custom Post Type #7747wpsmithMemberYou can try something like this on your template that you tried (it could also go into functions.php).
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
add_action( 'genesis_post_content', 'wps_cpt_do_post_content' );
/**
* Custom post content for cpt archive page
*/
function wps_cpt_do_post_content() {
if ( is_post_type_archive( 'wps_post_type_name' ) ) // change me to your registered cpt name
the_excerpt();
else
genesis_do_post_content();
}
December 27, 2012 at 12:25 pm in reply to: Need Help Displaying Manual Excerpts for Custom Post Type #7710wpsmithMemberYou may want to check out Genesis CPT Archives plugin that may help you a bit.
Please let me know if I can help any further.
wpsmithMemberAssuming you want this prior to the tags, etc., just change
add_action( 'genesis_after_post_content', 'streamline_after_post' );
to
add_action( 'genesis_after_post_content', 'streamline_after_post', 5 );
wpsmithMemberI wonder if Relevanssi can help this.
wpsmithMemberSorry, it stopped allowing me to edit my previous post. As for Github, possibly use Github oembed??
wpsmithMemberMy wishlist:
1. Ability to reply to a specific forum post (not sure if threaded posts are available).
2. Ability to use <li> with <ul> or <ol> tags (getting stripped and using <p>).
3. Ability to insert Github gists (via shortcode would be awesome!! since allowing scripts is not the best idea surely) or better code handling. It appears wpautop() is messing up code. See here: http://www.studiopress.community/topic/using-jquery-isotope/#post-147
wpsmithMemberHello,
You need to change get_template_directory_uri() to CHILD_URL or get_stylesheet_directory_uri()
wpsmithMemberFirst and foremost, script loading should be done via wp_enqueue_scripts hook, not get_header.
Also, unless you want (err, have) to have Google CDN jQuery, there is no need to deregister jquery. So feel free to delete these lines:
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' );Often times, this method (switching to Google jQuery or otherwise) will break plugins (mainly because the Google CDN failed for this reason or that OR the person doesn't update the version of jQuery like WordPress does for you). If I use Google CDN jQuery, here is my prefer method (gist):
So, here's what I would recommend as for the script loading (assuming the previous function exists in your child theme):
https://gist.github.com/4504030
-
AuthorPosts