mpanty
Forum Replies Created
-
Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeWorked!! Problem solved! 😀
Plug-in is now working fine, and if I de-activate it, the site displays a single author, as it should by default graphene settings!
Once again, thank you very much for all your help! 🙂
Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeTried that Daniel, but I get a parse error.
I tried two things: wrapping just the first line in PHP tags (like in your example), or the whole block of code (i.e. putting
?>right after the}at the end). I still get a parse error. Do I need more PHP tags in between?It would probably be easier if you could show me where you’d put all the tags into the whole block of code I posted above.
Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themekjodle sorry, I have no idea what you just said. 🙂
Daniel, your solution doesn’t seem to work properly because the “if… else” code doesn’t execute. Either that or I didn’t enter it correctly.
http://juventiknows.com/wp-content/uploads/2012/03/JK3b.jpg
Notice how both the original code and the co-authors code execute simultaneously, but the “if… else” function is ignored completely (the lines of code appear on the webpage!)
Here’s how I input it in loop.php:
if ( function_exists( 'coauthors_posts_links' ) ) { <?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?> <p class="post-author author vcard"> <span class="fn nickname"> by <?php coauthors_posts_links(); ?> </span> </p> <?php endif; ?> } else { <?php /* Post author, not shown if this is a Page post or if admin decides to hide it */ ?> <?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?> <p class="post-author author vcard"> <?php /* translators: this is for the author byline, such as 'by John Doe' */ $author_url = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" class="url">' . get_the_author_meta( 'display_name' ) . '</a>'; printf( __( 'by %s', 'graphene' ), '<span class="fn nickname">' . $author_url . '</span>' ); ?> </p> <?php endif; ?> }Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeOh, an added note for users who might have the same problem: the above fix works only for your homepage (which uses loop.php).
For single posts, you need to modify loop-single.php pretty much the same way.
Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeI think I fixed it.
1) Your “by” fix worked.
2) I removedechoin the snippet of code you suggested. Now it’s working fine.<?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?> <p class="post-author author vcard"> <span class="fn nickname"> by <?php coauthors_posts_links(); ?> </span> </p> <?php endif; ?>Just one thing: predictably, if I de-activate Co-Authors, my site gives me a fatal error due to those lines of code in loop.php. I wonder if there is a way to set up the code so that if Co-Authors isn’t active, the original code is used instead.
Kinda what’s suggested in the ‘other notes’ section of the plug-in’s website:
if(function_exists('coauthors_posts_links')) coauthors_posts_links(); else the_author_posts_link();…except in a way that the
elseconditions somehow include the original lines of code I posted above.I know I might this might be a little bit more complicated, so if it is I’m quite happy with just having the plug-in functioning properly. But it’d be nice to have a ‘clean’ solution to the whole problem. 🙂
Thank you very much for all your help by the way Daniel! 🙂 Much appreciated.
Forum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeI finally got around to trying your last suggestion Daniel.
As far as CSS goes, it worked: the author name appears where it should be.
However, I created two additional problems:
1) I lost the “by” word (“by” John Doe…)
2) The author name(s) appear in duplicateForum: Plugins
In reply to: [Co-Authors Plus] [Plugin: Co-Authors Plus] Installing on Graphene themeHi Daniel,
I tried what you suggested, though I had to expand the selection of code I replaced (the snippet I posted above was actually incomplete; replacing just that part gave me a syntax error)
I thus replaced the following:
<?php /* Post author, not shown if this is a Page post or if admin decides to hide it */ ?> <?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?> <p class="post-author author vcard"> <?php /* translators: this is for the author byline, such as 'by John Doe' */ $author_url = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" class="url">' . get_the_author_meta( 'display_name' ) . '</a>'; printf( __( 'by %s', 'graphene' ), '<span class="fn nickname">' . $author_url . '</span>' ); ?> </p> <?php endif; ?>with what you suggested,
<?php coauthors_posts_links(); ?>This the result:
(first JK1 image is with original loop file, JK2 image is modified)http://juventiknows.com/wp-content/uploads/2012/03/JK1.jpg
http://juventiknows.com/wp-content/uploads/2012/03/JK2.jpgAs you can see, I’ve lost the proper formatting as well as the “by” word.
I’d be extremely grateful if you could help me further with this Daniel, though I predict that you taking a look at the FULL loop.php file might be necessary. I’ve posted the original here on pastebin:
Thanks for creating this thread, hoffmangraphics!! I too was desperately trying to get the multiple authors to display under the title (and my homepage). Your comments here are what lead me to find the answer! 🙂
If this helps other people, here’s what I did.
I’m using the graphene theme for my website here:
http://juventiknows.com/I went into wp-content/themes/graphene, found the loop.php file, and searched for “by ” to find the relevant line of code. I then modified this line:
_e('by','graphene'); echo ' <span class="fn nickname">'; the_author_posts_link(); echo '</span>';with
_e('by','graphene'); echo ' <span class="fn nickname">'; if(function_exists('coauthors_posts_links')) coauthors_posts_links(); else the_author_posts_link(); echo '</span>';Now works like a charm! 😀 Not only are multiple authors displayed, but if I de-activate the plug-in, the original single author template is restored.
Woohoo!
Forum: Fixing WordPress
In reply to: Index column smaller than single columnNever mind, found the problem.
Turns out it was the PayPerPost tracking code I had inserted before the get_header php command:
<!-- PayPerPost --> <script type="text/javascript" src="http://tinyurl.com/2b5ojn"></script> <!-- PayPerPost -->Why that made my post column narrower I have no clue, but I’m curious to know. If anyone has any theories I’m all ears.
Anyways, removing the code fixed the problem.
Forum: Plugins
In reply to: MyAvatars plug-in won’t float right correctlySeems like I found a site that offers a partial solution for this problem (kudos to Napolux for the help!).
Here’s the site:
http://www.howtospoter.com/web-20/wordpress/turning-a-great-wordpress-plugin-into-superb”It includes a screenshot which shows where in the comments.php code structure you have to insert the MyAvatars function call, as well as a < div > command that should make the text float right better.
I’ve tested the solution and the problem under Firefox seems partially solved (image still overlaps into text, but much less). I guess that at this point that’s the best I can hope for.
Forum: Plugins
In reply to: MyAvatars plug-in won’t float right correctlyFollow-up: I changed the code for the float:right command: instead of integrating it in comments.php, I inserted the following in my style.css file (as outlined in the plugin install instructions):
img.MyAvatars { float : right; }However, I still have the same problem with Firefox: the image overlaps the text. Problem NOT solved.
Forum: Plugins
In reply to: MyAvatars plug-in won’t float right correctlybump
Forum: Fixing WordPress
In reply to: Showing Sidebar on individual articlesThanks phippster!! I had the same problem, and your suggestion fixed it nicely for me.
For my part, I opened single.php of my current theme, and inserted
<?php get_sidebar(); ?>just before
<?php get_footer(); ?>(essentially that’s the same lay-out as it is in the index.php file)
Then I modified widecolumn to narrowcolum as suggested by phippster12 and voilà . 🙂
I’m guessing that since macsoft didn’t reply anymore, the tweak solved her problem as well… this topic should be marked [resolved].
Forum: Plugins
In reply to: Show Top Commentators IE display problemOk, after seeing no response I started playing around with the PHP code to be executed inside the Widget. I seem to have found the problem.
If you’re not running a widget sidebar, the install instructions for the plug-in tell you to copy-paste the following code in the sidebar.php file of your theme:
<?php if(function_exists('ns_show_top_commentators')) { ?> <li> <h2>Top Commentators</h2> <ul><?php ns_show_top_commentators(); ?></ul> </li> <?php } ?>Now, I tested the above code as instructed (i.e. in my sidebar.php file, after disabling the sidebar widget), and it worked fine (no display problems). However, running the same code inside the widget with the Executable PHP, breaks the sidebar line (as my original post stated).
So what’s the solution? It seems that removing the list tags ( < li > and < /li > ) in the code fixes the problem. This is the code I’m running now, and it works fine:
<?php if(function_exists('ns_show_top_commentators')) { ?> <h2>Top Commentators</h2> <ul><?php ns_show_top_commentators(); ?></ul> <?php } ?>On a sidenote, the theme I have for my website is the default Kubrick theme. Perhaps for other themes this tweak won’t work, but it worked for me.
Forum: Fixing WordPress
In reply to: Website not displaying well on IEDead on the money Aleister! 🙂 I introduced the ‘www’ form in both ‘wordpress address’ and ‘blog address’ in the option menu, and now it’s working fine. Many thanks for your help!
It’s strange though that after I added that 301 redirect code, it tested fine immediately after. Could it be that the site was still in by browser’s cache? (then I guess I must have closed the browser or something, clearing the cache and then it stopped working). Am I guessing correctly or are completely off?
By the way, my theme’s header.php had no links pointing to my website (neither with www or without). Then again, I don’t need to touch that file since everything seems to be working now.