Showing Off Wasdale Mountain Rescue
-
Well I thought I figured it out. How did you get the Facebook Like Box to fill the column. I cannot get it to center and fill the box. Also, how did you get the menu title to be a hyperlink? You have a great site and I am learning a lot about word press trying to incorporate some of your ideas into a site I am setting up for a non profit foundation in memory of my nephew that died at age 25. Thanks
I use the following code: I put it in a plugin but I think it should work in your
functions.php
.//
Facebook Widget
class FacebookWidget extends WP_Widget
{
function FacebookWidget()
{
$widget_ops = array('classname' => 'FacebookWidget', 'description' => 'Displays a Facebook Link' );
$this->WP_Widget('FacebookWidget', 'Facebook Link', $widget_ops);
}
function form($instance)
{
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = $instance['title'];
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
return $instance;
}
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
echo $before_widget;
$title = '<a href="http://www.facebook.com/WasdaleMRT" title="Visit our Facebook page" rel="nofollow">Facebook Latest</a>';
if (!empty($title))
echo $before_title . $title . $after_title;
echo '<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/wasdalemrt" width="255" height="588" show_faces="true" border_color="" stream="true" header="false"></fb:like-box>';
echo $after_widget;
}
}
add_action( 'widgets_init', create_function('', 'return register_widget("FacebookWidget");') );This should create a new widget that you can place on your site. You just need to change the target in the link and the facebook username. You may have to play around with the css and height and width to get it to fit. You should be able to use firebug on my version to see what I did to get it to line up.
I hope this helps.
Jon
@ Jon,
<?php
/* — Adds About us link to top bar — */
add_action(‘graphene_feed_icon’,’wmrt_about_us’, 11);
function wmrt_about_us() {
echo ‘<div id=”wmrt_aboutus”><link a href=”‘ . get_site_url() . ‘/about-us/” title=”About Us”><span>About Us</span></link a></div>’;
}
?>
I’ve tried to get this to work along with your css that i found with firebug. But, I just can’t get it to work at all.
Can you help?
Thanks
ModJon is using an action hook there, but since that post, Syahir has added action hook widgets to Graphene to make it even easier.
Go to Graphene Options >> Advanced >> Action Hook Areas
click on “header.” A list of action hook widget areas will pop down. Click on “graphene_feed_icon”. Scroll to the bottom of the page and save options.
Go to your widgets pane. There is now a “Graphene Feed Icon” widget area. Drag a text widget over to it and add whatever text/html you like.
Good luck, and let us know how it works.
Ken
@Ken
Okay, I’ve tried and tried, but can’t get the css right. I know to use firebug and to copy the css from the theme to get it to work the same, but it just isn’t working.
To bad the theme doesn’t use classes everywhere instead of using id. then I’d try to just set up div with the same name as the reg menu.
Any idea?
http://tecdomainllc.info/test-wp/
at the top next to the rss icon **and under it 🙁 **
Jon,
I was able to get the text center and in line where it goes, but I would like it to have a drop down like the menu under the header.
I also would like to have it over by the search bar. I haven’t tried yet, but I’m guessing just to move it over there with that hook then float right.
But getting the drop down menu looks to be hard.
Viewing 10 posts - 11 through 20 (of 20 total)
- 1
- 2
- You must be logged in to reply to this topic.