Forum Replies Created
-
AuthorPosts
-
Af-mediaParticipant
Same here with the Digital Pro Theme...
November 20, 2017 at 5:39 am in reply to: Magazine Pro Difficulties with Hooks and prev and post nav links #213781Af-mediaParticipantYes, because It's the old code, the only one that works :
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 10 ); //* Add previous and next post links after entry remove_action( 'genesis_after_entry', 'genesis_prev_next_post_nav' ); add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav',7 ); add_action( 'genesis_entry_footer', 'themeprefix_alt_author_box', 9 ); //change hook for position
I just want to put these links above the author box !
November 19, 2017 at 6:57 am in reply to: Magazine Pro Difficulties with Hooks and prev and post nav links #213736Af-mediaParticipantHi Victor,
Thanks for the suggestion. Unfortunatly it doesn't display anything...
Here is the function.php if it helps (the code is line 159)<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Setup Theme include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'magazine', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'magazine' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Magazine Pro Theme', 'magazine' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/magazine/' ); define( 'CHILD_THEME_VERSION', '3.1' ); //* Enqueue Google Fonts and JS script add_action( 'wp_enqueue_scripts', 'magazine_enqueue_scripts' ); function magazine_enqueue_scripts() { wp_enqueue_script( 'magazine-entry-date', get_bloginfo( 'stylesheet_directory' ) . '/js/entry-date.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'magazine-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_style( 'dashicons' ); wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400|Raleway:400,500,900', array(), CHILD_THEME_VERSION ); } //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Add new image sizes add_image_size( 'home-middle', 360, 200, true ); add_image_size( 'home-top', 750, 420, true ); add_image_size( 'sidebar-thumbnail', 100, 100, true ); //* Add support for additional color styles add_theme_support( 'genesis-style-selector', array( 'magazine-pro-blue' => __( 'Magazine Pro Blue', 'magazine' ), 'magazine-pro-green' => __( 'Magazine Pro Green', 'magazine' ), 'magazine-pro-orange' => __( 'Magazine Pro Orange', 'magazine' ), ) ); //* Add support for custom header add_theme_support( 'custom-header', array( 'default-text-color' => '000000', 'header-selector' => '.site-title a', 'header-text' => true, 'height' => 90, 'width' => 380, ) ); //* Add support for custom header blog title function header_right_content () { echo '<div class="header-right"><h2> <span class="main-blog-title"> Mode etc .</span> <br/> <span class="secondary-blog-title"> à Paramé - Saint-Malo </span></h2></div>'; }; add_action('genesis_header_right', 'header_right_content'); remove_action ( 'genesis_site_title', 'genesis_seo_site_title' ); add_action( 'genesis_before_header', 'genesis_seo_site_title' ); //* Remove the site description remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); //* Add support for blog logo in site_description function site_description_content () { echo '<div class="site-logo"><a href="http://les-parameennes.fr"> <img width="300" src="http://les-parameennes.fr/wp-content/uploads/2016/03/les-parameennes.png"></a></div>'; }; add_action('genesis_site_description', 'site_description_content'); //* Reposition the primary navigation menu remove_action( 'genesis_before_header', 'genesis_do_nav' ); add_action( 'genesis_before', 'genesis_do_nav' ); //* Add primary-nav class if primary navigation is used add_filter( 'body_class', 'backcountry_no_nav_class' ); function backcountry_no_nav_class( $classes ) { $menu_locations = get_theme_mod( 'nav_menu_locations' ); if ( ! empty( $menu_locations['primary'] ) ) { $classes[] = 'primary-nav'; } return $classes; } //* Customize search form input box text add_filter( 'genesis_search_text', 'magazine_search_text' ); function magazine_search_text( $text ) { return esc_attr( __( 'Rechercher sur le blog ...', 'magazine' ) ); } //customizing authorbox and contact fields thanks to function themeprefix_modify_user_contact_methods( $user_contact ){ /* Add user contact methods */ $user_contact['facebook'] = __( 'Facebook URL' ); return $user_contact; } add_filter( 'user_contactmethods', 'themeprefix_modify_user_contact_methods' ); //Load Fontawesome function themeprefix_fontawesome_styles() { wp_register_style( 'fontawesome' , '//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css', '' , '4.4.0', 'all' ); wp_enqueue_style( 'fontawesome' ); } add_action( 'wp_enqueue_scripts', 'themeprefix_fontawesome_styles' ); //custom author box with social links function themeprefix_alt_author_box() { if( is_single() ) {?> <div class="author-box"><?php echo get_avatar( get_the_author_meta( 'ID' ), '70' ); ?> <div class="about-author"><h4>À propos de <?php echo get_the_author(); ?></h4><p><?php echo get_the_author_meta( 'description' ); ?> </div> <div class="all-posts"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' )); ?>">Voir tous les articles de <?php echo get_the_author(); ?></a></div> <ul class="social-links"> <?php if ( get_the_author_meta( 'facebook' ) != '' ): ?> <li><a href="<?php echo get_the_author_meta( 'facebook' ); ?>"><i class="fa fa-facebook"></i></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'twitter' ) != '' ): ?> <li><a href="https://twitter.com/<?php echo get_the_author_meta( 'twitter' ); ?>"><i class="fa fa-twitter"></i></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'googleplus' ) != '' ): ?> <li><a href="<?php echo get_the_author_meta( 'googleplus' ); ?>"><i class="fa fa-google-plus"></i></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'github' ) != '' ): ?> <li><a href="<?php echo get_the_author_meta( 'github' ); ?>"><i class="fa fa-github"></i></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'user_email' ) != '' ): ?> <li><a href="mailto:<?php echo get_the_author_meta( 'user_email' ); ?>"><i class="fa fa-envelope-o"></i></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'user_url' ) != '' ): ?> <li><a href="<?php echo get_the_author_meta( 'user_url' ); ?>"><i class="fa fa-laptop"></i> </a></li> <?php endif; ?> </ul> </div> <?php } } remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 10 ); //* Add previous and next post links after entry //*add_action( 'genesis_after_content', 'genesis_prev_next_post_nav',7 ); remove_action( 'genesis_after_entry', 'genesis_adjacent_entry_nav' ); add_action( 'genesis_entry_footer', 'genesis_adjacent_entry_nav',7 ); add_action( 'genesis_entry_footer', 'themeprefix_alt_author_box', 9 ); //change hook for position //* Display author box on single posts /*add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );*/ //* Display author box on archive pages /*add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );*/ //* Customize the author box title /*add_filter( 'genesis_author_box_title', 'custom_author_box_title' ); function custom_author_box_title() { return '<strong>À propos de l\'auteur </strong>'; } add_action( 'genesis_after_entry', 'genesis_do_author_box_on_page', 8 ); function genesis_do_author_box_on_page(){ if ( ! is_singular('page') ) return; if ( get_the_author_meta( 'genesis_author_box_single', get_the_author_meta( 'ID' ) ) ) genesis_author_box( 'single' ); } //* Modify the size of the Gravatar in the author box add_filter( 'genesis_author_box_gravatar_size', 'magazine_author_box_gravatar' ); function magazine_author_box_gravatar( $size ) { return 140; }*/ //* Modify the size of the Gravatar in the entry comments add_filter( 'genesis_comment_list_args', 'magazine_comments_gravatar' ); function magazine_comments_gravatar( $args ) { $args['avatar_size'] = 100; return $args; } //* Remove entry meta in entry footer add_action( 'genesis_before_entry', 'magazine_remove_entry_meta' ); function magazine_remove_entry_meta() { //* Remove if not single post if ( ! is_single() ) { remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); } } //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'magazine_remove_comment_form_allowed_tags' ); function magazine_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Add support for after entry widget add_theme_support( 'genesis-after-entry-widget-area' ); //* Relocate after entry widget remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' ); add_action( 'genesis_entry_footer', 'genesis_after_entry_widget_area' ); //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'magazine' ), 'description' => __( 'This is the top section of the homepage.', 'magazine' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle', 'name' => __( 'Home - Middle', 'magazine' ), 'description' => __( 'This is the middle section of the homepage.', 'magazine' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'magazine' ), 'description' => __( 'This is the bottom section of the homepage.', 'magazine' ), ) ); //* Custom Search form in French /** Customize search form input box text */ add_filter( 'genesis_search_text', 'custom_search_text' ); function custom_search_text( $text ) { return esc_attr( 'Rechercher sur le blog...' ); } //* Display a custom favicon add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' ); function sp_favicon_filter( $favicon_url ) { return 'http://www.mydomain.com/wp-content/themes/genesis/images/favicon.ico'; } add_filter( 'excerpt_more', 'genesischild_read_more_link', 2 ); /** Customize the read more link */ add_filter( 'get_the_content_more_link', 'custom_read_more_link' ); function custom_read_more_link() { return '... <a class="more-link" href="' . get_permalink() . '">[Lire la suite]</a>'; }
Af-mediaParticipantHi,
does your response work for the genesis portfolio pro plugin ?
As I don't want to modify all archive pages but just the one of the genesis portfolio pro plugin.Af-mediaParticipantThat's what I did but I didn't find the proper css since some file overrided it.
It's ok now.I've some others questions about customising Genesis Portfolio Pro :
how can I change the thumbnail size on the Archive Page ?
how can I add an excerpt of the item text content ? (here is an example of what I want items to look like : http://www.bootply.com/render/64957 )Regards
August 28, 2015 at 4:54 pm in reply to: Magazine Pro: no image in article page or recent post #163944Af-mediaParticipantHi,
it is what I tried at first but without success...
The only way I found to display an image in article is to include it in the body of the article as described in my previous post,Any idea why the "display image on archives" is not working?
Thanks
August 23, 2015 at 2:55 am in reply to: Magazine Pro: no image in article page or recent post #163217Af-mediaParticipantThank you, the home page looks now fine.
But I still don't have any image on the article page, but maybe I have to manually insert the image in the entry body?Af-mediaParticipantI finally found the way to put the site title in the genesis_before_header
and done some css customization.
I don't know if it's a good way to achieve my header design, (especially regarding to seo ?) but it looks fine.Af-mediaParticipantHi Brad,
thanks for the tips, I follow your advice but I've still some questions
What I've done so far :
I added the image as a logo so I think it figures in genesis_site_title
I've added a div containing blog title 1 and blog title 2 in genesis_header_right
The menu is a secondary menu, with text-align : rightNow, my questions :
Is what I've described above a good way of doing things?
How can I set the Blog Name (ie site_title) in genesis_before_header?Thanks for helping,
Af-media
-
AuthorPosts