raindance

Member

Forum Replies Created

  • In reply to: Change View Full Post

    #17568

    Yup…no spaces…unless you’re seeing one I’m missing?

    It had all kinds of spaces before though and was working 🙂

    In reply to: Change View Full Post

    #17565

    This is what I have now:

    <?php
    function graphene_slider_post_types(){
    return array('post', 'page');
    }
    add_filter( 'graphene_slider_post_type', 'graphene_slider_post_types' );
    // attaches the function my_post_nav to the hook graphene_post_nav
    add_action ('graphene_after_post_content', 'my_post_nav');
    // our function
    function my_post_nav(){
    // this will allow us to use other hooks but still only show on single posts
    if ( is_single() && ! is_page() ) : ?>
    <div id="my-post-nav"> <!-- div to contain your links -->
    <?php previous_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Previous page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?> |
    <?php next_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Next page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?>
    </div>
    <?php endif; ?>
    <?php } ?>
    <?php
    /******
    * these next two remove the graphene breadcrumb and then add one
    * which does not appear on the home page
    *****/
    // has to be called after the action is added
    add_action ('after_setup_theme', 'wmrt_remove_graphene_bc');
    function wmrt_remove_graphene_bc() {
    remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
    }
    add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');
    function wmrt_breadcrumb_navxt () {
    //by calling this at this point is_home() works!
    if ((function_exists('bcn_display')) && (!(is_front_page()))) {
    echo '<div class="breadcrumb">';
    bcn_display();
    echo '</div>';
    }
    }
    ?>

    And I get the same error,

    Warning: Cannot modify header information – headers already sent by (output started at /home/juicytrv/public_html/wp-content/themes/graphene-child/functions.php:51) in /home/juicytrv/public_html/wp-includes/pluggable.php on line 934

    In reply to: Change View Full Post

    #17564

    Hmmm…well so still not letting me save anything in graphene options and I now I have:

    <?php

    function graphene_slider_post_types(){

    return array(‘post’, ‘page’);

    }

    add_filter( ‘graphene_slider_post_type’, ‘graphene_slider_post_types’ );

    // attaches the function my_post_nav to the hook graphene_post_nav

    add_action (‘graphene_after_post_content’, ‘my_post_nav’);

    // our function

    function my_post_nav(){

    // this will allow us to use other hooks but still only show on single posts

    if ( is_single() && ! is_page() ) : ?>

    <div id=”my-post-nav”> <!– div to contain your links –>

    <?php previous_post_link_plus( array(

    ‘order_by’ => ‘menu_order’,

    ‘loop’ => false,

    ‘max_length’ => 0,

    ‘tooltip’ => ‘Previous page’,

    ‘in_same_cat’ => true,

    ‘ex_cats’ => ’12’

    ) );?> |

    <?php next_post_link_plus( array(

    ‘order_by’ => ‘menu_order’,

    ‘loop’ => false,

    ‘max_length’ => 0,

    ‘tooltip’ => ‘Next page’,

    ‘in_same_cat’ => true,

    ‘ex_cats’ => ’12’

    ) );?>

    </div>

    <?php endif; ?>

    <?php } ?>

    <?php

    /******

    * these next two remove the graphene breadcrumb and then add one

    * which does not appear on the home page

    *****/

    // has to be called after the action is added

    add_action (‘after_setup_theme’, ‘wmrt_remove_graphene_bc’);

    function wmrt_remove_graphene_bc() {

    remove_action (‘graphene_top_content’, ‘graphene_breadcrumb_navxt’);

    }

    add_action(‘graphene_top_content’, ‘wmrt_breadcrumb_navxt’);

    function wmrt_breadcrumb_navxt () {

    //by calling this at this point is_home() works!

    if ((function_exists(‘bcn_display’)) && (!(is_front_page()))) {

    echo ‘<div class=”breadcrumb”>’;

    bcn_display();

    echo ‘</div>’;

    }

    }

    function graphene_filter_gettext( $translated, $original, $domain ) {

    $strings = array(

    ‘View full post’ => ‘Read More’,

    );

    if ( ! empty( $strings[$original] ) ) {

    $translations = &get_translations_for_domain( $domain );

    $translated = $translations->translate( $strings[$original] );

    }

    return $translated;

    }

    add_filter( ‘gettext’, ‘graphene_filter_gettext’, 10, 3 );

    ?>

    `

    remove more?? It was working ok until I added that last bit.

    In reply to: Change View Full Post

    #17561

    Here is my entire functions.php file, and line 68 is the closing tag. It’s not liking something…

    <?php
    function graphene_slider_post_types(){
    return array('post', 'page');
    }
    add_filter( 'graphene_slider_post_type', 'graphene_slider_post_types' );
    ?>
    <?php
    // attaches the function my_post_nav to the hook graphene_post_nav
    add_action ('graphene_after_post_content', 'my_post_nav');
    // our function
    function my_post_nav(){
    // this will allow us to use other hooks but still only show on single posts
    if ( is_single() && ! is_page() ) : ?>
    <div id="my-post-nav"> <!-- div to contain your links -->
    <?php previous_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Previous page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?> |
    <?php next_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Next page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?>
    </div>
    <?php endif; ?>
    <?php } ?>
    <?php
    /******
    * these next two remove the graphene breadcrumb and then add one
    * which does not appear on the home page
    *****/

    // has to be called after the action is added
    add_action ('after_setup_theme', 'wmrt_remove_graphene_bc');
    function wmrt_remove_graphene_bc() {
    remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
    }

    add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');
    function wmrt_breadcrumb_navxt () {
    //by calling this at this point is_home() works!
    if ((function_exists('bcn_display')) && (!(is_front_page()))) {
    echo '<div class="breadcrumb">';
    bcn_display();
    echo '</div>';
    }
    }
    ?>
    <?php
    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'View full post' => 'Read More',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
    ?>

    Did I do the tags wrong?

    In reply to: Change View Full Post

    #17558

    Hmmm…that worked but now when I go to the Graphene Options pane, to try to make the fb like button go to the right in that top row, and save, I get this error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/juicytrv/public_html/wp-content/themes/graphene-child/functions.php:68) in /home/juicytrv/public_html/wp-includes/pluggable.php on line 934

    I’ve gotten that before and it makes it so I can’t log in, have to disable my child theme functions.php file, log in, then re-enable it. Any idea what’s going on?

    This happened the other day and I couldn’t save anything…no posts, pages, changes in admin…nada.

    In reply to: Change View Full Post

    #17557

    Oh duh, yup that was it. Yeay! SO much easier than that whole localization thing…I was lost on that one.

    What else can be changed via this method? I mean what other things are coded in this way which can be adjusted here?

    Thanks!

    In reply to: Change View Full Post

    #17555

    Ooops…well I added this to my child theme functions.php file:

    <?php
    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'View Full Post' => 'Read More',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
    ?>

    But no dice. What did I do wrong 🙂

    In reply to: Change View Full Post

    #17554

    Ok so to distill it…

    Would I add this to my child theme functions.php file and just change

    ‘Follow me on Twitter’ => ‘Follow my organisation on Twitter’,

    to

    ‘View Full Post’ => ‘Read More’, ??

    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'Follow me on Twitter' => 'Follow my organisation on Twitter',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );

    In reply to: Changing "View Full Post" on child theme

    #17383

    I’m not sure if the problem I’m having is the same…

    I installed Codestyling Localization

    When I click on “Localization” in the left side of the dashboard, it lists all my plugins etc. and Graphene but says Graphene is not activated.

    1. Why is showing as inactive? How to activate?

    2. Which file/where/what do I change to change the button text “view full post”?

    Thanks

    In reply to: Share this code on home page only in menu bar?

    #17548

    Got it 🙂

    }

    #text-3 {

    margin-top:248px;

    margin-left:740px;

    }

    http://juicytravels.com/

    But I failed to appreciate that it would conflict with the menus so maybe I’ll move it up to the top bar then I guess.

    Thanks again for the guidance.

Viewing 10 posts - 161 through 170 (of 312 total)