Community Forums › Forums › Archived Forums › Design Tips and Tricks › Replace […] with [Read More] link – Enterprise pro
Tagged: read more
- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by Brad Dalton.
-
AuthorPosts
-
May 5, 2015 at 11:27 am #150243HeatherOParticipant
Hello,
I want to replace the non-linking [...] to a [Read More] link to the full post.
I searched the forums and found this topic but when I tried it I got a syntax error message.
Would the code to put in the functions.php file be theme specific? I am using Enterprise Pro.
Please show me exactly where it goes in the functions.php file.
Thank you!
http://seuscp.com/category/anchor-companies/
HeatherMay 5, 2015 at 12:36 pm #150252Brad DaltonParticipant1. Open your functions.php file using a code editor
2. Copy the PHP code from the view raw link in the Gist
3. Paste it at the end of the file and save
May 5, 2015 at 1:41 pm #150274HeatherOParticipantWhen I paste it at the very bottom of the functions.php file (in Dreamweaver) I get the line 114 in red and message:
"There is a syntax error on line 114. Code hinting may not work until you fix this error."
May 5, 2015 at 1:48 pm #150276Brad DaltonParticipantDon't use Dreamweaver. Use a code editor like Notepad++ for Windows or Text Wrangler for Mac.
Or
You can use File Manager in cPanel
May 5, 2015 at 2:15 pm #150281HeatherOParticipantI downloaded TextWrangler, opened the functions.php file, added the raw code from Gist to the very bottom, saved and the site had that syntax error on line 114.
So I uploaded the original file via FTP to get the site back up.
May 5, 2015 at 2:16 pm #150283HeatherOParticipantMaybe this will help. I must be adding it wrong.
<?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( 'enterprise', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'enterprise' ) );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Enterprise Pro Theme', 'enterprise' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/enterprise/' );
define( 'CHILD_THEME_VERSION', '2.1.1' );//* 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' );//* Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'enterprise_load_scripts' );
function enterprise_load_scripts() {wp_enqueue_script( 'enterprise-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=Lato:300,700,300italic|Titillium+Web:600', array(), CHILD_THEME_VERSION );
}
//* Add new image sizes
add_image_size( 'featured-image', 358, 200, TRUE );
add_image_size( 'home-top', 750, 600, TRUE );//* Add support for custom header
add_theme_support( 'custom-header', array(
'header-selector' => '.site-title a',
'header-text' => false,
'height' => 150,
'width' => 244,
'flex-width' => true,
'flex-height' => true,
) );//* Add support for additional color style options
add_theme_support( 'genesis-style-selector', array(
'enterprise-pro-black' => __( 'Enterprise Pro Black', 'enterprise' ),
'enterprise-pro-green' => __( 'Enterprise Pro Green', 'enterprise' ),
'enterprise-pro-orange' => __( 'Enterprise Pro Orange', 'enterprise' ),
'enterprise-pro-red' => __( 'Enterprise Pro Red', 'enterprise' ),
'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ),
) );//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'site-inner',
'footer-widgets',
'footer',
) );//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_footer', 'genesis_do_subnav', 7 );//* Reduce the secondary navigation menu to one level depth
add_filter( 'wp_nav_menu_args', 'enterprise_secondary_menu_args' );
function enterprise_secondary_menu_args( $args ){if( 'secondary' != $args['theme_location'] )
return $args;$args['depth'] = 1;
return $args;}
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'enterprise_remove_comment_form_allowed_tags' );
function enterprise_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_after_entry', 'genesis_after_entry_widget_area', 5 );//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'enterprise' ),
'description' => __( 'This is the top section of the homepage.', 'enterprise' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home - Bottom', 'enterprise' ),
'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ),
) );<?php
//* Do NOT include the opening php tag//* Modify the WordPress read more link
add_filter( 'the_content_more_link', 'sp_read_more_link' );
function sp_read_more_link() {
return '[Continue Reading]';
}May 5, 2015 at 2:26 pm #150285Brad DaltonParticipantMay 6, 2015 at 9:47 am #150384HeatherOParticipantOMG. I'm so stupid.
I removed that code and the site is loading, but the [...] is still not replaced: http://seuscp.com/category/anchor-companies/
May 6, 2015 at 12:36 pm #150407Brad DaltonParticipant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.