chocks
Forum Replies Created
-
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Looping the loop.. reversed?Thanks for dropping by Scribu! I wrote the following:
<?php $connected_offices = p2p_type( 'jobs_to_offices' )->get_connected(); $show_offices = new WP_Query("post_type=offices&posts_per_page=-1&post__in=$connected_offices"); $i=1; while ($show_offices->have_posts()) : $show_offices->the_post(); ?> <li class="drop-list"><span><?php the_title();?></span> <ul class="accord-list"> <?php $connected = p2p_type( 'jobs_to_offices' )->get_connected( $post ); while ( $connected->have_posts() ) : $connected->the_post(); ?> <li><a href="<?php the_permalink();?>"><?php the_title();?></a></li> <?php // Prevent weirdness endwhile; wp_reset_postdata(); ?> </ul> </li> <?php endwhile; ?>
But it brought me all the offices instead of the ones that actually have active connections. I thought that by sending $connected_offices = p2p_type( ‘jobs_to_offices’ )->get_connected(); to post__in it would do the trick.. but it didn’t..
Any clue?
Forum: Hacks
In reply to: Editing taxonomy name post type modifying other tax post typeUpdate: for some reason.. (how could this have happened?) they are sharing the tag ID. I’d have to manually change the id.
Forum: Fixing WordPress
In reply to: Custom Post Type Weirdness After 3.1 UpgradeI sort it out registering another post type, and converting them..
Forum: Fixing WordPress
In reply to: Custom Post Type Weirdness After 3.1 UpgradeSame here! What’s going on? Any clue?
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] ERROR: Facebook user not recognized.Hey applemango, here’s the function:
function redirectregister(){ wp_redirect(get_option('siteurl') . '/profile/'); } add_action('login_head', 'redirectregister');
paste it in your functions.php file, note that the redirect goes in this case to “profile” page.
@jordashtalon that plugin, I belive, is not written by Otto, therefore you are on a wrong tag/thread.
HTH
chocks
Nice. Thanks!
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] ERROR: Facebook user not recognized.Right, it depends what do you want to achieve. In my case I wanted people to *login* into the site using FB credentials.. but of course they wouldn’t have a user preassigned.. so they needed to register. Now SFC comes handy as (if they are logged in FB) it grabs the name and email and tells them to ‘Register’. Once they register they get redirected to the dashboard (no my case, but the regular scenario will be like this) and from now on they can login with their FB credentials without worrying about the WP user details.
@guar thanks dude! that’s really helpful! Quick question: do you know how to update the “change frequency” of just 1 page?
Forum: Fixing WordPress
In reply to: redirect after logoutsaxamo, you can use this instead:
function redirect_logout() { if ( preg_match('#(wp-login.php)?(loggedout=true)#',$_SERVER['REQUEST_URI'])) wp_redirect(get_option('siteurl')); }
Chocks
@xdreamwalker
You can (yes.. we can?): create a new css file (and rule) to target the login page. Then write something like this:#loginform {position:relative;} .FB_login_button {position:absolute;top:-24px;left:70px;}
Note: I haven’t tested but it should work..
Btw, rule to target login page:
function fb_custom_login() { echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/custom-login.css" />'; } add_action('login_head', 'fb_custom_login');
In this case I created: custom-login.css file and uploaded to my custom theme folder.
@swordf1zh you can. Activate the SFC Widget plugin. Register a widget area for this purpose. Place that area wherever you want on the Theme. Drag the widget (backend) to this newly created area. You are done.
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] ERROR: Facebook user not recognized.@whitemonster yeah, it has to be enabled, otherwise people won’t be able to register on the site with FB credentials.
What it’ll happen:
clicking on the FB button will get the name and email and ask them to register to WP by simply clicking on “Register” and “A password will be emailed to you”. After clickin “register” they’ll get redirected to the dashboad.God saves Otto ??
Forum: Plugins
In reply to: [Plugin: Simple Facebook Connect] ERROR: Facebook user not recognized.@brilou, @brian7997 have you got “anyone can register” enabled on the General Settings?
I’ll try that! Thanks!
Forum: Fixing WordPress
In reply to: Complicated 3 Loops and Pagination on Category.phpThanks for your reply esmi. Unfortunately it didn’t work. If I execute:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args= array( 'posts_per_page' => '1', 'offset' => 0, 'cat' => $thecat, 'paged' => $paged ); $my_query = new WP_Query($args); $foto_secundaria = get_post_meta($post->ID, "pft_secundaria", $single = true); ?>
I retrieves the first post but doesn’t show the excerpt and the pagination doesn’t work either..
If I add at the bottom of the code, before “?>”:
while ($wp_query->have_posts()) : $wp_query->the_post();
It shows the loop as a standard one.. any other idea?