• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Sjoerd Smeets

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 30, 2015 at 2:48 am in reply to: Sixteen Nine excerpt question #154197
    Sjoerd Smeets
    Participant

    Solved it by using the following..

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    	return 20; // pull first 20 words
    }
    
    // Replaces the excerpt "more" text by a link
    function new_excerpt_more($more) {
           global $post;
    	return '<br /><a class="moretag" href="'. get_permalink($post->ID) . '">Lees verder...</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Thanks!

    May 30, 2015 at 1:53 am in reply to: Sixteen Nine excerpt question #154195
    Sjoerd Smeets
    Participant

    As explained above i already tried that but it isn't working.

    In functions.php i added:

    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'sp_read_more_link' );
    function sp_read_more_link() {
    	return '<a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
    }

    but nothing shows up as you can see http://www.sjoerdsmeets.info/

    June 11, 2014 at 11:15 pm in reply to: Enterprise Pro footer alignment #109438
    Sjoerd Smeets
    Participant

    Thanks, that worked!

    January 2, 2014 at 12:22 am in reply to: Portfolio possible in 411 Pro Theme? #82630
    Sjoerd Smeets
    Participant

    When i pasted the code of functions.php i saw the flaw..

    Imported all Instagram photo's to the new portfolio CPT and created the page. Works like a charm!
    Thanks Brad.

    http://www.veermakelol.nl/portfolio/

    January 2, 2014 at 12:08 am in reply to: Portfolio possible in 411 Pro Theme? #82629
    Sjoerd Smeets
    Participant

    functions.php

    /<?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'the-411', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'the-411' ) );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'The 411 Pro Theme', 'the-411' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/the-411/' );
    define( 'CHILD_THEME_VERSION', '1.0' );
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5' );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Enqueue Google fonts
    add_action( 'wp_enqueue_scripts', 'the_411_google_fonts' );
    function the_411_google_fonts() {
    
    	wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400|Roboto+Slab:300,400', array(), CHILD_THEME_VERSION );
    
    }
    
    //* Enqueue Backstretch script and prepare images for loading
    add_action( 'wp_enqueue_scripts', 'the_411_enqueue_scripts' );
    function the_411_enqueue_scripts() {
    
    	wp_enqueue_script( 'the-411-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    
    	//* Load scripts only if custom background is being used
    	if ( ! get_background_image() )
    		return;
    
    	wp_enqueue_script( 'the-411-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
    	wp_enqueue_script( 'the-411-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'the-411-backstretch' ), '1.0.0' );
    
    	wp_localize_script( 'the-411-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', get_background_image() ) ) );
    
    }
    
    //* Add support for custom background
    add_theme_support( 'custom-background', array( 'wp-head-callback' => 'the_411_background_callback' ) ); 
    
    //* Add custom background callback for background color
    function the_411_background_callback() {
    
    	if ( ! get_background_color() )
    		return;
    
    	printf( '<style>body { background-color: #%s; }</style>' . "\n", get_background_color() );
    
    }
    
    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    	'width'           => 200,
    	'height'          => 60,
    	'header-selector' => '.site-title a',
    	'header-text'     => false,
    ) );
    
    //* Add support for post formats
    add_theme_support( 'post-formats', array(
    	'quote',
    ) );
    
    //* Add support for 2-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 2 );
    
    //* Unregister layout settings
    genesis_unregister_layout( 'content-sidebar' );
    genesis_unregister_layout( 'sidebar-content' );
    genesis_unregister_layout( 'content-sidebar-sidebar' );
    genesis_unregister_layout( 'sidebar-sidebar-content' );
    genesis_unregister_layout( 'sidebar-content-sidebar' );
    
    //* Unregister primary/secondary navigation menus
    remove_theme_support( 'genesis-menus' );
    
    //* Unregister sidebars
    unregister_sidebar( 'sidebar' );
    unregister_sidebar( 'sidebar-alt' );
    
    //* Force full-width-content layout setting
    add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
    
    //* Remove elements with post formats
    add_action( 'genesis_before_entry', 'the_411_remove_elements' );
    function the_411_remove_elements() {
    	
    	//* Remove if post has format
    	if ( get_post_format() ) {
    	
    		add_filter( 'genesis_pre_get_option_content_archive', 'the_411_format_content' );
    		add_filter( 'genesis_pre_get_option_content_archive_limit', 'the_411_content_limit' );
    		add_filter( 'genesis_pre_get_option_content_archive_thumbnail', '__return_false' );
    		remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    		remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    		remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    		remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    		remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    		remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    		
    	}
    	//* Add back, as post has no format
    	else {
    	
    		remove_filter( 'genesis_pre_get_option_content_archive', 'the_411_format_content' );
    		remove_filter( 'genesis_pre_get_option_content_archive_limit', 'the_411_content_limit' );
    		remove_filter( 'genesis_pre_get_option_content_archive_thumbnail', '__return_false' );
    		add_action( 'genesis_entry_header', 'genesis_do_post_title' );
    		add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    		add_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    		add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    		add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    		add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    		add_action( 'genesis_entry_footer', 'genesis_post_meta' );
    		
    	}
    
    }
    
    function the_411_format_content() {
    	return 'full';
    }
    
    function the_411_content_limit() {
    	return '0';
    }
    
    //* Hook social icons and click here widget areas
    add_action( 'genesis_after_header', 'the_411_extras' );
    function the_411_extras() {
    
    	if ( is_active_sidebar( 'social-icons' ) || is_active_sidebar( 'click-here' ) ) {
    
     		echo '<div class="site-extras">';
    
     		genesis_widget_area( 'social-icons', array(
    			'before'	=> '<div class="social-icons">',
    			'after'		=> '</div>'
    		) );
    
    		genesis_widget_area( 'click-here', array(
    			'before'	=> '<div class="click-here">',
    			'after'		=> '</div>'
    		) );
    
    		echo '</div>';
    
    	}
    
    }
    
    //* Hook welcome message widget area before content
    add_action( 'genesis_before_loop', 'the_411_welcome_message' );
    function the_411_welcome_message() {
    
    	if ( ! is_front_page() || get_query_var( 'paged' ) >= 2 )
    		return;
    
    	genesis_widget_area( 'welcome-message', array(
    		'before' => '<div class="welcome-message widget-area">',
    		'after'  => '</div>',
    	) );
    
    }
    
    //* Remove entry meta in entry footer
    add_action( 'genesis_before_entry', 'the_411_remove_entry_meta' );
    function the_411_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 );
    		
    	}
    
    }
    
    //* Hook after post widget after the entry content
    add_action( 'genesis_after_entry', 'the_411_after_entry', 5 );
    function the_411_after_entry() {
    
    	if ( is_singular( 'post' ) )
    		genesis_widget_area( 'after-entry', array(
    			'before' => '<div class="after-entry widget-area">',
    			'after'  => '</div>',
    		) );
    
    }
    
    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'the_411_read_more' );
    function the_411_read_more() {
    
    	return '<a class="more-link" href="' . get_permalink() . '">' . __( 'Continue Reading', 'the_411' ) . '</a>';
    
    }
    
    //* Modify the content limit read more link
    add_action( 'genesis_before_loop', 'the_411_more' );
    function the_411_more() {
    
    	add_filter( 'get_the_content_more_link', 'the_411_read_more' );
    	
    }
    
    add_action( 'genesis_after_loop', 'the_411_remove_more' );
    function the_411_remove_more() {
    
    	remove_filter( 'get_the_content_more_link', 'the_411_read_more' );
    	
    }
    
    //* Remove comment form allowed tags
    add_filter( 'comment_form_defaults', 'the_411_remove_comment_form_allowed_tags' );
    function the_411_remove_comment_form_allowed_tags( $defaults ) {
    
    	$defaults['comment_notes_after'] = '';
    	return $defaults;
    
    }
    
    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'the_411_author_box_gravatar' );
    function the_411_author_box_gravatar( $size ) {
    
    	return 140;
    
    }
    
    //* Modify the size of the Gravatar in the entry comments
    add_filter( 'genesis_comment_list_args', 'the_411_comments_gravatar' );
    function the_411_comments_gravatar( $args ) {
    
    	$args['avatar_size'] = 96;
    
    	return $args;
    
    }
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'welcome-message',
    	'name'        => __( 'Welcome Message', 'the_411' ),
    	'description' => __( 'This is the welcome message widget area.', 'the_411' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'social-icons',
    	'name'        => __( 'Social Icons', 'the_411' ),
    	'description' => __( 'This is the social icons widget area.', 'the_411' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'click-here',
    	'name'        => __( 'Click Here', 'the_411' ),
    	'description' => __( 'This is the click here widget area.', 'the_411' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'after-entry',
    	'name'        => __( 'After Entry', 'the_411' ),
    	'description' => __( 'This is the after entry widget area.', 'the_411' ),
    ) );
    
    //* Add a custom post type Recepten
    add_action( 'init', 'recipe_post_type' );
    function recipe_post_type() {
      // Portfolio custom post type
    	register_post_type( 'recepten',
    		array(
    			'labels' => array(
    				'name' => __( 'Recepten' ),
    				'singular_name' => __( 'Recepten' ),
    			),
    			'has_archive' => true,
    			'public' => true,
    			'show_ui' => true, // defaults to true so don't have to include
    			'show_in_menu' => true, // defaults to true so don't have to include
    			'rewrite' => array( 'slug' => 'recepten' ),
    			'supports' => array( 'title', 'editor', 'comments', 'genesis-seo', 'thumbnail','genesis-cpt-archives-settings' ),
    		)
    	);
    }
    
    //* Add a custom post type Photoblog
    add_action( 'init', 'photoblog_post_type' );
    function photoblog_post_type() {
      // Portfolio custom post type
    	register_post_type( 'photoblog',
    		array(
    			'labels' => array(
    				'name' => __( 'Photoblog' ),
    				'singular_name' => __( 'photoblog' ),
    			),
    			'has_archive' => true,
    			'public' => true,
    			'show_ui' => true, // defaults to true so don't have to include
    			'show_in_menu' => true, // defaults to true so don't have to include
    			'rewrite' => array( 'slug' => 'photoblog' ),
    			'supports' => array( 'title', 'editor', 'comments', 'genesis-seo', 'thumbnail','genesis-cpt-archives-settings' ),
    		)
    	);
    }
    
    //* Vanaf hier aanpassingen voor grid view photoblog
    
    //* Create portfolio custom post type
    add_action( 'init', 'executive_portfolio_post_type' );
    function executive_portfolio_post_type() {
    
    	register_post_type( 'portfolio',
    		array(
    			'labels' => array(
    				'name'          => __( 'Portfolio', 'executive' ),
    				'singular_name' => __( 'Portfolio', 'executive' ),
    			),
    			'has_archive'  => true,
    			'hierarchical' => true,
    			'menu_icon'    => get_stylesheet_directory_uri() . '/lib/icons/portfolio.png',
    			'public'       => true,
    			'rewrite'      => array( 'slug' => 'portfolio', 'with_front' => false ),
    			'supports'     => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes', 'genesis-seo', 'genesis-cpt-archives-settings' ),
    			'taxonomies'   => array( 'portfolio-type' ),
    
    		)
    	);
    	
    }
    
    //* Add Portfolio Type Taxonomy to columns
    add_filter( 'manage_taxonomies_for_portfolio_columns', 'portfolio_columns' );
    function portfolio_columns( $taxonomies ) {
    
        $taxonomies[] = 'portfolio-type';
        return $taxonomies;
    
    }
    
    //* Change the number of portfolio items to be displayed (props Bill Erickson)
    add_action( 'pre_get_posts', 'executive_portfolio_items' );
    function executive_portfolio_items( $query ) {
    
    	if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'portfolio' ) ) {
    		$query->set( 'posts_per_page', '8' );
    	}
    
    }
    
    //* Customize Portfolio post info and post meta
    add_filter( 'genesis_post_info', 'executive_portfolio_post_info_meta' );
    add_filter( 'genesis_post_meta', 'executive_portfolio_post_info_meta' );
    function executive_portfolio_post_info_meta( $output ) {
    
         if( 'portfolio' == get_post_type() )
            return '';
    
        return $output;
    
    }
    
    //* Load Admin Stylesheet
    add_action( 'admin_enqueue_scripts', 'executive_load_admin_styles' );
    function executive_load_admin_styles() {
    
    	wp_register_style( 'custom_wp_admin_css', get_stylesheet_directory_uri() . '/lib/admin-style.css', false, '1.0.0' );
    	wp_enqueue_style( 'custom_wp_admin_css' );
    
    }
    
    //* Create Portfolio Type custom taxonomy
    add_action( 'init', 'executive_type_taxonomy' );
    function executive_type_taxonomy() {
    
    	register_taxonomy( 'portfolio-type', 'portfolio',
    		array(
    			'labels' => array(
    				'name'          => _x( 'Types', 'taxonomy general name', 'executive' ),
    				'add_new_item'  => __( 'Add New Portfolio Type', 'executive' ),
    				'new_item_name' => __( 'New Portfolio Type', 'executive' ),
    			),
    			'exclude_from_search' => true,
    			'has_archive'         => true,
    			'hierarchical'        => true,
    			'rewrite'             => array( 'slug' => 'portfolio-type', 'with_front' => false ),
    			'show_ui'             => true,
    			'show_tagcloud'       => false,
    		)
    	);
    
    }
    January 1, 2014 at 6:34 am in reply to: Portfolio possible in 411 Pro Theme? #82463
    Sjoerd Smeets
    Participant

    When i follow you're instructions and want to save the permalinks i get this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/vml2011/domains/veermakelol.nl/public_html/wp-content/themes/the-411-pro/functions.php:1) in /home/vml2011/domains/veermakelol.nl/public_html/wp-includes/pluggable.php on line 896

    January 1, 2014 at 6:20 am in reply to: Portfolio possible in 411 Pro Theme? #82460
    Sjoerd Smeets
    Participant

    They are not saved as featured images, they go directly into the post itself.
    Is it possible without the featured image?

    December 20, 2012 at 11:33 pm in reply to: A honest discussion about the changes #6586
    Sjoerd Smeets
    Participant

    I totally agree. Instead of going forward with extending support, the Genesis community is going backwards.. maybe (in time) they will review it and change it back, but for now the community is stuck with this.. 🙁

    What i hate most, is that now all issues are placed in one forum instead of how it used to be.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble