Forum Replies Created
-
AuthorPosts
-
marjwyattMember
I have done as you requested but I'm pretty sure that Nick is part of this forum too so I thought it would be beneficial to post here as well.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberNope ... not my code. In the downloaded plugin, this was at the top:
`
function __construct() {$this->defaults = array(
'count' => 0,
'title' => '',
'post_type' => 'post',
'page_id' => '',
'posts_term' => '',
'exclude_terms' => '',
'exclude_cat' => '',
'include_exclude' => '',
'post_id' => '',
'posts_num' => 1,
'posts_offset' => 0,
'orderby' => '',
'order' => '',
'meta_key' => '',
'show_sticky' => '',
'paged' => '',
'show_paged' => '',
'post_align' => '',
'show_image' => 0,
'link_image' => 1,
'image_position' => 'before-title',
'image_alignment' => '',
'image_size' => '',
'link_image_field' => '',
'show_gravatar' => 0,
'gravatar_alignment' => '',
'gravatar_size' => '',
'link_gravatar' => 0,
'show_title' => 0,
'link_title' => 1,
'link_title_field' => '',
'title_limit' => '',
'title_cutoff' => '…',
'show_byline' => 0,
'post_info' => '[post_date] ' . __( 'By', 'gfwa' ) . ' [post_author_posts_link] [post_comments]',
'show_content' => 'excerpt',
'show_archive_line' => 0,
'archive_link' => '',
'post_meta' => '[post_categories] [post_tags]',
'content_limit' => '',
'more_text' => __( '[Read More...]', 'gfwa' ),
'extra_posts' => '',
'extra_num' => '',
'extra_title' => '',
'extra_format' => 'ul',
'more_from_category' => '',
'more_from_category_text' => __( 'More Posts from this Taxonomy', 'gfwa' ),
'custom_field' => ''
);I changed this line of code
downloaded code: `'post_type' => 'post',`
revised code: `'post_type' => '',`It now works, with all my customizations in place.
Thanks for "forcing" me to look at it again. (smile) Now I can move forward.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberI had great hopes that it would but, when I loaded the widget, any attempt to chose another post type failed from the dropdown. You could install it and try for yourself.
The plugin hasn't been updated in nearly a year. It could be that a WP update has affected its functionality.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberIt might, if I could select anything other than post from the dropdown.
I'll look at the plugin code and see if I can reverse engineer it for my purposes. Thanks.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +April 19, 2013 at 5:08 pm in reply to: Author not displaying in meta data for single custom post type #36460marjwyattMemberThanks Dave ... with your help, I was able to sort out a method to isolate the ID for the after post in content accordion menu but I still don't have an answer as to why the post info for my custom post type is missing information that it has for archives.
I'll soldier on and come back with the final & functional code.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +April 19, 2013 at 11:51 am in reply to: Author not displaying in meta data for single custom post type #36421marjwyattMemberHi Dave,
Nope ... moved that variable just after the while and again after the_post() and nothing has changed.
And I still would like to know why the author is missing from the post info right next to the date when it shows up in archives. That is really what I'm trying to accomplish. All the echoing inside the post itself was to see if the code knew who the author was.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +April 19, 2013 at 11:23 am in reply to: Author not displaying in meta data for single custom post type #36412marjwyattMemberThanks for your reply and suggestion, Dave, but those lines are not excluded. The variable $postid is being used successfully inside the loop to extract the custom fields and display them.
To show this to you (or anyone looking on), I am echoing the category slug just under the play button of the media. See this page:
http://creativeconundrum.com/freshfaces/songs/song-title/Any other ideas? I'm trying to get the author into the post info area and I just can figure out why it shows in archive displays and not on the single post itself...
Archive display link:
http://creativeconundrum.com/freshfaces/blues/
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberI found an answer to this problem on WordPress Codex. Here's the code that worked for me:
`add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if(is_category() || is_tag() || is_home() && empty( $query->query_vars['suppress_filters'] ) ) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
$post_type = array('post','song','nav_menu_item');
$query->set('post_type',$post_type);
return $query;
}
}`The full discussion on this topic can be found here:
http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page/page/2?replies=40
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMember@surefirewebserv ... thanks again for your suggestions. The one that finally worked was discovered by me prior to your suggestion, however. I just hadn't found the Genesis tutorial that indicated we could change the href destination within the code that alters the backtotop text.
As for the workaround of turning off the admin bar, of course I'm aware of that. I did mention that I am building a lot of membership sites, right? For those memberships, I am authoring code that gives the members perpetual access to the links they need on the site, like the members home portal, etc. To that end, turning off the admin bar is counterproductive.
To my way of thinking, the top of the page is the top of the page, not the top of the wrap for that page. So, we will have to agree to disagree on whether or not # is preferred over #wrap. In my opinion, it is not. and I will alter this filter on every custom theme that I write going forward, until the Genesis Framework makes a change.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberAn alternate solution would be to download the genesis simple edits plugin and edit the footer info using the back to top shortcode with href=”#”
I'm really not a big fan of adding plugins to any site for such a simple issue. The second idea you suggest did work. I had tried that next and just hadn't gotten back her to update the thread as being resolved.
Where do I post a suggestion that this shortcode be changed in the framework itself. It seems "wrong" to have it go to #wrap in the first place, to me.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberThanks for the suggestion but it didn't work for me. In fact, that code makes the link to the top not work at all.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberI tried the plugin. It didn't work for me.
Yes, plugins are not supported forever. Even those written by our mutual colleague, Nick. See this thread:
http://www.studiopress.community/topic/move-search-form-to-secondary-nav/
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberA very long time ago. I figured it out on my own and that project is delivered and paid for now.
Thanks for checking in though.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberThanks for the suggestion.
The problem with using a plugin is that plugins are not always maintained. If the code was part of the Genesis Framework itself, ongoing support would be guaranteed.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberI'll join the spirit of this conversation and say that I'm not a fan of the new sample child theme's style sheet either. As SelenaD mentions above, there are many things that I find myself stripping out. Besides, isn't redeclaring CSS selectors over and over for different single styling factors fly in the face of CSS itself, where using shorthand and economizing on lines of code used to be one of the primary goals?
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google +marjwyattMemberIf anyone else needs to do this, here is the solution that worked for me. The inspiration was derived from this old blog post written by Bill Erickson: http://www.billerickson.net/genesis-wordpress-nav-menu-content/
This code is added to your child theme's functions.php:
/** Add search form to secondary navigation menu */
// Ref link: http://www.billerickson.net/genesis-wordpress-nav-menu-content/
add_filter( 'genesis_nav_items', 'dt_subnav_search', 10, 2 );
add_filter( 'wp_nav_menu_items', 'dt_subnav_search', 10, 2 );
/**
* @param string $menu
* @param array $args
* @return string
*/
function dt_subnav_search ($menu, $args) {
$args = (array)$args;
if ( 'secondary' !== $args['theme_location'] )
return $menu;
$dtsearch = '' . genesis_search_form() . '';
return $menu . $dtsearch;
}Additionally, I copied the Primary Navigation Extras styles to create styles for Secondary Navigation Extras:
/* Secondary Navigation Extras
------------------------------------------------------------ */#subnav .menu li.right { float: right; font-family: 'Oswald', arial, serif; padding: 10px 15px; }
#subnav .menu li.right a { background: none; border: none; color: #333; display: inline; text-decoration: none; }
#subnav .menu li.right a:hover { color: #ed702b; text-decoration: none; }
#subnav .menu li.search { width: 28%; padding: 7px 10px 0; }
#subnav .menu li.rss a { background: url(images/rss.png) no-repeat center left; margin: 0 0 0 10px; padding: 0 0 0 16px; }
#subnav .menu li.twitter a { background: url(images/twitter-nav.png) no-repeat center left; padding: 0 0 0 20px; }Tiny CSS tweaks after that to make it work on my site design and I'm all set. I hope this helps someone else.
Virtually Marj Wyatt
VirtuallyMarj.com | Twitter | Facebook | Google + -
AuthorPosts