Rico Michel
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Custom post type tags/categories archive pageTanks for your answer, but I think I found a better one. WordPress will look for an archive page for custom post types; but you have to tell it it’s there. First, when you initialize the custom type, there’s an has_archive option that needs to be ‘true’. Then, you create an archive page named “archive-“[customtypename].
Then you put whatever you want in this page, like a special header followed by a call to loop-archive, for example.
See ya people!
RicoForum: Themes and Templates
In reply to: Custom post type tags/categories archive pageThis code seems work good. $query->set seems like the way to go.
Now, How do you display a special archive page for your custom posts? Mine aren’t categorized, and the archive shows the blog archive, as if there wasn’t a request.
I’d need a way to catch the custom post type in an archive page to show a special header. Something like “if is_custom(‘name’) echo $specialheader”.
Geez, now i’m a real wordpress geek… welcome, eh ??
Forum: Plugins
In reply to: [Facebook Connect] [Plugin: Facebook Connect] BugHi people
Valentinas, I totally understand what you’re going through, but your plugin is the best! It’s lightweight and manages one-click Facebook subscriptions perfectly (so far). Whatever happened to your teammate?
Now, I’m no real coder, but here’s the code I used to solve the reloads problem. Passing an empty href defaults to the current url. Tested in Explorer and Firefox, as well as on Macs. This replaces the fb_footer() function located in the functions.php file:
function fb_footer(){
?>
<script type=”text/javascript”>
FB.init({appId: ‘???your app ID goes here???’, status: true, cookie: true, xfbml: true});
FB.Event.subscribe(‘auth.sessionChange’, function(response) {
if (response.session) {
window.location.href=””;
} else {
window.location.href=””;
}
});
</script>
<?php
}With this mod the plugin works good in my WordPress 3.0.1 installation: https://elricoshow.com/
See ya — Rico
Forum: Plugins
In reply to: [Facebook Connect] [Plugin: Facebook Connect] BugJust put the url in there, and no document ready. It works!
You might also want to check the replace_avatar function — when there are many user avatars to display, it slows down the load time considerably. I think the plugin should at least have the option to save the user’s fb profile picture in the WP database, and not make individual calls to all pictures every time.
Consider over 100 million iOS devices sold — nobody needs a computer anymore, but web developers ??
Forum: Plugins
In reply to: [Facebook Connect] [Plugin: Facebook Connect] BugHi Valentinas
My enquiries led me to two things: you should simply pass the current url to the footer’s response.session. In WP you may need to rewind posts for the_permalink() to work.
Also, using the jQuery (document).ready in the footer isn’t a good idea cuz it causes bugs in the WP dashboard, if you alredy have a (document).ready in the header.
Rico
Forum: Plugins
In reply to: [Facebook Connect] [Plugin: Facebook Connect] BugHi Valentinas and thanks for your quick reply.
I disabled the footer script in the functions.php file, and the plugin still works good! I used to get a blank page in IE sometimes and now it loads properly. I’ve tested creating a new user too, and it works fine. I dunno which problem you ran into, but I didn’t see it — so hopefully, that’s good news!
Another thing I wanted to mention is the FB button font size doesn’t seem to work. I specify the size in the do_shortcode statement; but it is ignored. Any ideas? The page is here: music downloads page.
Thanks again, I’ll keep in touch.
RicoForum: Plugins
In reply to: [Facebook Connect] [Plugin: Facebook Connect] BugHi Valentinas
I like your plugin very much for its simplicity & modularity —?however I’ve had reports of slow load times in my site, this is due to FB.Event.subscribe ‘auth.sessionChange’ in the wp-footer.
This loads the page twice on every new session; it’s especially bad on an iPhone (or iPad or Android) cuz these devices don’t have browser caching as far as I know.
I mean it’s slow and frustratng. So I really hope you can figure something out. Is that FB request essential, or could I replace it with something else?
Thanks!
Rico