shackep
Forum Replies Created
-
When will this be added to the plugin. I have tried this but every time I add:
`function vslider($option=’vslider_options’){
global $blog_id;
if(isset($blog_id)){
$blogs_dir = ‘/blogs.dir/’ . $blog_id;
}
…`
it breaks the site. The other bits add alright.
Thanks,
PeterThanks! I know have,
<?php while (have_posts()) { the_post(); $count++; switch_to_blog($post->blog_id); if (get_option('woo_woo_tumblog_switch') == 'true') { $is_tumblog = woo_tumblog_test(); } else { $is_tumblog = false; } $title_before = '<h1 class="title">'; $title_after = '</h1>'; if ( ! is_single() ) { $title_before = $title_before . '<a href="' . get_permalink( get_the_ID() ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">'; $title_after = '</a>' . $title_after; } $page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); woo_post_before(); ?>
and it works.
I have it built to have people be able to search the blog they are on first. If they want to broaden their search results there is another search field on the results page that pulls from the specific set of blogs. The loop is a little more complicated because it is a Wootheme’s Canvas loop.
<?php /** * Loop - Search * * This is the loop logic used on the search results screen. * * @package WooFramework * @subpackage Template */ global $more; $more = 0; woo_loop_before(); if (have_posts()) { $count = 0; $title_before = '<span class="archive_header">'; $title_after = '</span>'; //echo $title_before . sprintf( __( 'Search results for "%s"', 'woothemes' ), get_search_query() ) . $title_after; ?> <h2 class="pagetitle">Search Result for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<span class="search-terms">'); echo $key; _e('</span>'); _e(' — '); echo $count . ' '; _e('articles'); wp_reset_query(); ?></h2><hr> <div> <h3>Not finding what you are looking for? Search all FMCUSA sites.</h3><form method="get" action="https://fmcusa.org/"> <span class="fr secondary-search"> <input type="text" value="To search, type and hit enter..." name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter...';}" /> <input type="hidden" id="searchsubmit" value="Search" /> <input type="hidden" name="searchblogs" value="34,35,13,14,15,37,50,48,9" /> </form></span> </div> <hr> <div class="fix"></div> <?php switch_to_blog($post->blog_id); ?> <?php while (have_posts()) { the_post(); $count++; if (get_option('woo_woo_tumblog_switch') == 'true') { $is_tumblog = woo_tumblog_test(); } else { $is_tumblog = false; } $title_before = '<h1 class="title">'; $title_after = '</h1>'; if ( ! is_single() ) { $title_before = $title_before . '<a href="' . get_permalink( get_the_ID() ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">'; $title_after = '</a>' . $title_after; } $page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); woo_post_before(); ?> <div <?php post_class(); ?>> <?php woo_post_inside_before(); the_title( $title_before, $title_after ); woo_post_meta(); ?> <div class="entry"> <?php the_excerpt(); wp_link_pages( $page_link_args ); ?> </div><!-- /.entry --> <?php woo_post_inside_after(); ?> </div><!-- /.post --> <?php woo_post_after(); comments_template(); } // End WHILE Loop } else { get_template_part( 'content', 'noposts' ); } // End IF Statement woo_loop_after(); woo_pagenav(); ?>
Forum: Networking WordPress
In reply to: Widget classes and id's go missingThat worked! Deleted and recreated the sidebars in woothemes sidebar manager.
Forum: Networking WordPress
In reply to: Widget classes and id's go missingThanks Ipstenu, this did not fix it. I am using woothemes sidebar manager, I wonder if I need to delete the sidebar and recreate it. I’ll give it a try. I noticed that there are instances where it is working. https://fmcusa.org/hr/holiday-schedule/
Forum: Hacks
In reply to: Shortcodes in Custom Meta BoxesThis is what I used to call a shortcode from custom fields. This might help get you headed in the right direction.
I used this to pull a short code out of my post custom meta boxes and make it happen. It is a if than because I wanted it to default to the original setup (insert picture) if there was no video to add.
<?php if( get_post_meta($post->ID, "video", true) ): ?> <?php $values = get_post_custom_values('video'); $shortcode_output = do_shortcode($values[0]);/ print $shortcode_output; ?> <?php else: ?> <a href="<?php the_permalink() ?>" class="open"><?php woo_get_image('image','438', '295','alignleft slider-image',90,get_the_id(),'img'); ?></a> <?php endif; ?>
Forum: Plugins
In reply to: [WPBook] [Plugin: WPBook] FB Admined Pages not showing/PageID not workingYes, I made the change and this resolved that issue for me. Thanks. It took a little hunting to figure out I was to add the above code to the index.php in themes.
Now this is where things are at:
https://img.skitch.com/20100729-eicnct8ddpny6ufdikx1nun5be.png
My best guess would be that FB is trying to pull in the theme css along with the content, which is throwing up parsing errors?
Peter
Forum: Plugins
In reply to: [WPBook] [Plugin: WPBook] FB Admined Pages not showing/PageID not workingHi John, Thanks for your response.
Yes, my fan page was not listed as one of the pages I am an admin of.Before writing my first message I added the application to the page, as you have stated above, repeatedly thinking I might have missed something but it did not show up in the fan page edit mode.
After getting your response I tried again and it did show up!
Now when I click grant permissions I get this. (I have included what was in the address bar in case that gives any clues.)
https://skitch.com/shackep/dqu6q/facebook-error-1-1
Once I click “Okay” I get:
https://skitch.com/shackep/dqu9n/facebook-page-not-found
Thanks again.
Peter