Skip to content

Instantly share code, notes, and snippets.

@AdelDima
Last active June 10, 2017 10:45
Show Gist options
  • Select an option

  • Save AdelDima/4a59caaaa06362e84e26418d044e1e27 to your computer and use it in GitHub Desktop.

Select an option

Save AdelDima/4a59caaaa06362e84e26418d044e1e27 to your computer and use it in GitHub Desktop.

Revisions

  1. AdelDima revised this gist Jun 10, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion functions.php
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,9 @@
    function prefix_blog_read_more_btn() {
    $post = get_post( get_the_ID() );
    $post = get_permalink( $post, false );
    return "<a style=\"display: block; width: 120px; margin-top: 20px;\" class=\"dima-button dima-btn-no-rounded fill dima-btn-mini\" href=\"{$post}\">esc_html__( 'Read More', 'okab' )</a>";
    return "<a style=\"display: block; width: 120px; margin-top: 20px;\" class=\"dima-button dima-btn-no-rounded fill dima-btn-mini\" href=\"{$post}\">"
    .esc_html__( 'Read More', 'okab' )
    ."</a>";
    }
    add_filter( 'dima_blog_read_more_excerpt', 'prefix_blog_read_more_btn' );

  2. AdelDima revised this gist May 15, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    /**
    * Add a Read More button
    * @return string
    @@ -26,3 +28,5 @@ function prefix_breadcrumbs_defaults(){
    }

    add_filter('dima_breadcrumbs_defaults','prefix_breadcrumbs_defaults' );

    ?>
  3. AdelDima created this gist May 15, 2017.
    28 changes: 28 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    /**
    * Add a Read More button
    * @return string
    */
    function prefix_blog_read_more_btn() {
    $post = get_post( get_the_ID() );
    $post = get_permalink( $post, false );
    return "<a style=\"display: block; width: 120px; margin-top: 20px;\" class=\"dima-button dima-btn-no-rounded fill dima-btn-mini\" href=\"{$post}\">esc_html__( 'Read More', 'okab' )</a>";
    }
    add_filter( 'dima_blog_read_more_excerpt', 'prefix_blog_read_more_btn' );



    /**
    * change the breadcrumb to say *Our Blog* instead of *Home*
    * @return array
    */
    function prefix_breadcrumbs_defaults(){
    $_options = array(
    'home_label' => esc_html__( 'Our Blog', 'okab' ),
    'tag_archive_text' => esc_html__( 'Tag:', 'okab' ),
    'search_text' => esc_html__( 'Search:', 'okab' ),
    'error_text' => esc_html__( '404 - Page not Found', 'okab' ),
    );
    return $_options;
    }

    add_filter('dima_breadcrumbs_defaults','prefix_breadcrumbs_defaults' );