I have an interesting challenge that I'm coming up short on (I'm not a WordPress plugin developer). I am using a site that has <em>OptimizePress</em> as a theme. <em>Optimizepress</em> calls
many times in building a page.
I want to include a little code snippet in the body of every page.
That shows a couple of flags and lets you switch languages on the site. So I need a div set to fixed position / 0,0 (I can adjust later for looks) that has that in it.
Other than outputting something in
, which seems to be the popular way to do this, what is the best way to achieve getting this on every page of a wordpress site?
<strong>Update</strong>
The code below started - here was my final code that output flags only in the top right corner of the site on every page.
Code:
the_content
I want to include a little code snippet in the body of every page.
Code:
if ( function_exists( "transposh_widget" ) ) {
transposh_widget(array(), array(
'title' => 'Translation',
'widget_file' => 'flags/tpw_flags_css.php',
) );
}
That shows a couple of flags and lets you switch languages on the site. So I need a div set to fixed position / 0,0 (I can adjust later for looks) that has that in it.
Other than outputting something in
Code:
the_content
<strong>Update</strong>
The code below started - here was my final code that output flags only in the top right corner of the site on every page.
Code:
<?php
/*
Plugin Name: Transposh Flags in Header
Description: Embed Transposh Header Code (in Footer of Page)
*/
function insert_my_footer() {
echo '<div style="display:block; top:30px; right: 50px; position: fixed; color:white;">';
if (function_exists("transposh_widget")) {
transposh_widget(array(),
array('title'=>'',
'widget_file' => 'flags/tpw_flags.php') );
}
echo '</div>';
}
add_action('wp_footer', 'insert_my_footer');
?>