Forum Replies Created

Viewing 15 replies - 1 through 15 (of 23 total)
  • Thread Starter paulevisser

    (@paulevisser)

    Never mind, it a FB developer site setting.

    Thanks for all your help

    Thread Starter paulevisser

    (@paulevisser)

    Ok ,nobita.

    Did some studying.
    I was able to trim the code to this:

    <?php
    add_filter( 'raindrops_footer_text', 'function_name' );
    
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">©2014 ALL-Serve Niagara</p>';
    	$html_after	 = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fallserveniagara&width&layout=button&action=like&show_faces=false&share=true&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true";align="center"></iframe>';
    
    	return $html_before . $return_value . $html_after;
    }
    ?>

    And it all seems fine, however, if you look at the footer:
    allserveniagara.ca

    You will see the FB iframe is not centered?

    Any ideas how to adjust that?

    Paul

    Thread Starter paulevisser

    (@paulevisser)

    SO, I merged the code into the functions.php
    Receive an error:

    Fatal error: Cannot redeclare function_name() (previously declared in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:5) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php on line 33

    Can I just add a “1” to the end of the function name?

    Heres my new functions.php:

    <?php
    // facebook code start
    add_filter( 'raindrops_footer_text', 'function_name' );
    
    function function_name( $return_value ) {
    
    	$html_before = '<p style="text-align:center">hello world</p>';
    	$html_after	 = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fallserveniagara&width&layout=button&action=like&show_faces=false&share=true&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true";align="center"></iframe>';
    
    	return $html_before . $return_value . $html_after;
    }
    // facebook code end
    ?><?php
    /**
     * functions and constants for Raindrops theme
     *
     *
     * @package Raindrops
     * @since Raindrops 0.1
     */
    if ( !defined( 'ABSPATH' ) ) {
    
    	exit;
    }
    
    //remove start
    add_filter( 'raindrops_footer_text', 'function_name' );
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">©2014 ALL-Serve Niagara</p>';
    
    	return $html_before . $return_value ;
    }
    //remove end

    Many thanks
    Paul

    Thread Starter paulevisser

    (@paulevisser)

    I am very slowly,
    Thanks for your patience

    Paul

    Thread Starter paulevisser

    (@paulevisser)

    It works until I add the content from the existing function.php file

    Old file was:

    <?php
    add_filter( 'raindrops_footer_text', 'function_name' );
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">©2014 ALL-Serve Niagara</p>';
    
    	return $html_before . $return_value ;
    }

    So I merged the two and made this:

    <?php
    // facebook code start
    add_filter( 'raindrops_footer_text', 'function_name' );
    
    function function_name( $return_value ) {
    
    	$html_before = '<p style="text-align:center">hello world</p>';
    	$html_after	 = '<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fallserveniagara&width&layout=button&action=like&show_faces=false&share=true&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true";align="center"></iframe>';
    
    	return $html_before . $return_value . $html_after;
    }
    // facebook code end
    ?><?php
    /**
     * functions and constants for Raindrops theme
     *
     *
     * @package Raindrops
     * @since Raindrops 0.1
     */
    if ( !defined( 'ABSPATH' ) ) {
    
    	exit;
    }
    add_filter( 'raindrops_footer_text', 'function_name' );
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">©2014 ALL-Serve Niagara</p>';
    
    	return $html_before . $return_value ;
    }

    But then I get an error:

    Fatal error: Cannot redeclare function_name() (previously declared in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:5) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php on line 31

    Each code on its own works fine, put them together, and somewhere I am messing it up.

    Thanks for all you assistance so far.
    Paul

    Thread Starter paulevisser

    (@paulevisser)

    I tried this in the iframe code, but it’s not working

    <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fallserveniagara&width&layout=button&action=like&show_faces=false&share=true&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true";align="center"></iframe>

    Forum: Fixing WordPress
    In reply to: Can't login.
    Thread Starter paulevisser

    (@paulevisser)

    All fixed thx

    Thread Starter paulevisser

    (@paulevisser)

    All good now

    Thread Starter paulevisser

    (@paulevisser)

    That seems to work, but its not centered.

    Do you know the iframe code that I need to make it centered?

    Thanks
    Paul

    Thread Starter paulevisser

    (@paulevisser)

    Oh, bother..

    I think I found the issue.

    Notrbook++ was not set to save as UTF8 without BOM

    Changed the setting, and site is up..

    Thread Starter paulevisser

    (@paulevisser)

    ok, I did all that your recommend, and still get an error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:1) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-includes/pluggable.php on line 1179

    And now the site is missing all raindrops formatting. Here is the site:
    http://allserveniagara.ca/

    And my new functions.php:

    <?php
    add_filter( 'raindrops_footer_text', 'function_name' );
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">2014 ALL-Serve Niagara</p>';
    	return $html_before . $return_value ;
    }

    Used Notepad++ as recommended.

    Thanks
    Paul

    Forum: Fixing WordPress
    In reply to: Can't login.
    Thread Starter paulevisser

    (@paulevisser)

    There is no space there.
    And file is saved as UTF-8, I am using Windows Notepad to edit

    I have actually a more in depth post here:

    https://wordpress.org/support/topic/site-is-white-and-will-not-load-when-child-theme-is-active?replies=1#post-6306343

    Thanks
    Paul

    Thread Starter paulevisser

    (@paulevisser)

    This is the code fb gave me.

    <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fallserveniagara&width&layout=standard&action=like&show_faces=false&share=true&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true"></iframe>

    I just have no idea where to put it.

    Thread Starter paulevisser

    (@paulevisser)

    Thank You

    Worked like a charm

    Paul

    Thread Starter paulevisser

    (@paulevisser)

    Did, that, the double space still occurs when a bulleted list is made

    As you can see on this page

Viewing 15 replies - 1 through 15 (of 23 total)