Forum Replies Created
-
AuthorPosts
-
NWTD
MemberCurrently the magazine theme.
February 20, 2015 at 12:25 pm in reply to: Trouble with a single-xx.php template in Outreach #141509NWTD
MemberSingle page template.
Understood on the echo do_shortcode -- I'm literally copy/pasta from the plugin's own template to make it work within genesis.
February 20, 2015 at 11:52 am in reply to: Trouble with a single-xx.php template in Outreach #141492NWTD
MemberThat's for the post's title. I'm talking about the title of the page located in the <head> section of the HTML markup. Sorry for the confusion.
NWTD
MemberTo clarify, as the Super Admin, I am able to see the Header/Footer scripts, but I would also like for local admins to have access to them as well.
NWTD
Member@braddalton Thank you!!!
I swear I scoured the documentation and couldn't find anything relating to the HTML5 version of the codes. The only thing I haven't been able to find is how to remove comments from just this category. Did I miss that in the link you sent?
February 24, 2014 at 1:28 pm in reply to: Changing function of "Genesis – Featured Posts" image #92179NWTD
MemberRather than altering the way the widget functions, could I add my desired output to the widget callback in the template?
My current theme is calling the widget with the following:
genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area"><div class="wrap">', 'after' => '</div></div>', ) );
I tried the following with no luck...maybe there's a better way?
$bkgd_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'home-top' ); genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area" style="background-image: url(' . $bkgd_img . ');"><div class="wrap">', 'after' => '</div></div>', ) );
NWTD
MemberJust out of curiosity, when you say you dug around int he code, by that I suppose you mean the Genesis "Theme", but were specifically are you looking. There's a few other similar cases I need to figure out for my custom theme, and I'd like to try to figure it out myself.
NWTD
MemberThanks so much @rfmeier! That worked perfect!
My final code in my functions.php looked like this:
remove_action( 'genesis_after_header', 'genesis_do_nav' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); add_action( 'genesis_header', 'custom_genesis_header_markup_close', 15 ); function custom_genesis_header_markup_close() { genesis_structural_wrap( 'header', 'close' ); genesis_do_nav(); genesis_markup( array( 'html5' => '</header>', 'xhtml' => '</div>', ) ); }
NWTD
MemberI don't think that will get the nav where I'm needing it. My current HTML ouput is as follows:
<header> <div class="wrap"> <div class="title-area"></div> <aside class="widget-area"></div> </div> </header>
So everything I've tried, puts my nav inside the <div class="wrap">, which I don't want. Ideally, I'd like to look like this:
<header> <div class="wrap"> <div class="title-area"></div> <aside class="widget-area"></div> </div> <nav class="primary"></nav> </header>
Where the nav is outside of the div.wrap. I hope that makes more sense.
NWTD
MemberThanks @rfmeier .
I tried your suggestion. That moved the nav outside of the </header> DOM. I tried a value of 15, which resulted in the same. I tried a value of 14, which put the navigation inside the <div class="wrap"> DOM...which is right back where I started.
NWTD
MemberIf any one has any suggestions, I'd appreciate the feedback. I do have this posted on WordPress Answers as well
NWTD
MemberThanks @braddalton. I did come across that, however, I wasn't sure how to apply the filters and make it work for what I want or to apply the walker. Do you have any suggestions or examples of how to make it work?
FWIW, I extended the walker class and was able to get menu items to have the <span> tag with this code. The only problem was that it just dumped that nav at the top of my pages rather than applying it to my exisitng nav in my templates.
class Menu_With_Data_Attr extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="' . esc_attr( $class_names ) . '"'; $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>'; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= '<a'. $attributes .'><span data-hover="'.$item->title.'">'; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= '</span></a>'; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } }
NWTD
Member@anitac That got me part way there. Adding that bit of code to my functions.php just dumped the menu at the top of my page. Is there a way to edit the output of the genesis_do_nav to show these changes?
NWTD
Member@braddalton, My site's under development, so providing a link wouldn't be much help.
I'm using the Genesis Sample child theme to develop my site.All I'm after is to add a <span> around the text in each navigation item.
NWTD
MemberMy choice of words, "host", was not to imply that I wanted to host individual subsites for each theme on my network; unless, of course, that's how StudioPress has accomplished this. I was hoping for the same interaction from the SP theme shop, with the ability to open/close theme demos in a lightbox style and the ability to demo a mobile version.
NWTD
MemberI ended up editing the plugin file. Not ideal since I may be using this plugin on multiple sites of my network...but it works for now. Maybe this could be a feature request for the next version?
In `genesis-responsive-slider.php` on line 323, I added this:
`<div class="meta">
<div class="date"><?php echo get_the_date(); ?></div>
<div class="category">
<?php
$category = get_the_category();
if($category[0]){
echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
}
?>
</div>
</div>`It works for what I need in the meantime.
NWTD
MemberI'm using the Genesis Responsive Slider. I see the option for displaying a post's content and title. Maybe there's a hack that can go into the plugin file to get the meta?
NWTD
Member...bump...
I can't seem to find any documentation worthy to point me in the right direction on making sure that these page templates are compatible with my Genesis Framework themes...any thoughts?
Thanks!
NWTD
MemberAre there any other tutorials, documentations, examples or otherwise that might be able to point me in the right direction rather than relying on paid support from a third party? I've scoured the tutorials and code snippets and can't find anything really for accomplishing this.
Is there a way to check if the genesis framework is used on a site and then use conditionals to create the page templates?
NWTD
MemberThanks! I realized that I wasn't using the responsive slider, but the regular slider. I changed to the responsive and have what I'm looking for. Thanks!
-
AuthorPosts