Skip to content

Instantly share code, notes, and snippets.

@sterndata
Last active November 11, 2016 05:09
Show Gist options
  • Select an option

  • Save sterndata/02e0db2c38d13fe9185d73156f59834f to your computer and use it in GitHub Desktop.

Select an option

Save sterndata/02e0db2c38d13fe9185d73156f59834f to your computer and use it in GitHub Desktop.

Revisions

  1. Steven Stern revised this gist Nov 11, 2016. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -13,3 +13,24 @@ function theme_excerpt_more( $more ) {
    return ' [<a class="more-link" href="' . get_permalink( $post->ID ) . '">Read more..</a>]';
    // return "...";
    }
    /*
    * add theme options page (ACF)
    */
    acf_add_options_page(array(
    'page_title' => 'Theme General Settings',
    'menu_title' => 'Theme Settings',
    'menu_slug' => 'theme-general-settings',
    'capability' => 'edit_posts',
    'redirect' => false,
    ));

    /*
    * Hide the ACF menu
    * /
    // /**
    * hide the ACF menu in admin
    */
    // uncomment when site goes live to hide the ACF menu
    // add_filter('acf/settings/show_admin', '__return_false');


  2. Steven Stern revised this gist Nov 11, 2016. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -4,3 +4,12 @@ function theme_scripts() {
    $themecsspath = get_stylesheet_directory() . '/style.css';
    wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), filemtime( $themecsspath )
    );

    /* change the excerpt's more.. to a linked text Read More...
    * be sure to add a class for more-link
    */
    function theme_excerpt_more( $more ) {
    global $post;
    return ' [<a class="more-link" href="' . get_permalink( $post->ID ) . '">Read more..</a>]';
    // return "...";
    }
  3. Steven Stern created this gist Nov 11, 2016.
    6 changes: 6 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    <?
    /* replace this part of the function theme_scripts in "Enqueue scripts and styles" */
    function theme_scripts() {
    $themecsspath = get_stylesheet_directory() . '/style.css';
    wp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), filemtime( $themecsspath )
    );