HopefulGJL
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to add a horizontal space with PHP?I believe what you’re referring to is the aweber opt-in form. It’s easily closed with the ‘x’ in the upper right-hand corner.
Since aweber opt-in forms are very common, I’m confused why there’s an issue with it?
(P.S. And, yes I’m aware I could have put the link in text, but opted not to. I went ahead and changed it since it was still editable.)
Forum: Fixing WordPress
In reply to: How to add a horizontal space with PHP?Ok, here you go.
Please excuse the work-in-progress “dust” as I’m working on it to improve it…
Forum: Fixing WordPress
In reply to: How to add a horizontal space with PHP?Sure.
<!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> <p style="padding-left: 15px;"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_pinterest_pinit"></a> <div class="addthis_toolbox addthis_default_style"> <a class="addthis_button_linkedin_counter" li:counter="none"></a> <letter-spacing:15px;><a class="addthis_button_google_plusone" g:plusone:count="false"></a> <a class="addthis_counter addthis_pill_style"></a></p> </div> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-518895bb724be09b"></script> <!-- AddThis Button END -->
I’m looking to get a space between the LinkedIn button, google+ button, and the share button. They are all very (too) close together for my taste.
And, I doubt anything can be done about it, but the facebook Like, Twitter Tweet, and PinIt buttons are too far apart.
The spacing between PinIt and LInkedIn are perfect.
If you still need a link to the site, let me know. Thank-you much!
Forum: Fixing WordPress
In reply to: How to add a horizontal space with PHP?Thanks for the information, however I don’t know a whole lot about code so could I kindly get some additional information around that?
Forum: Fixing WordPress
In reply to: Code for calling and randomizing contents of a .txt?If anyone is looking to alter this slightly for height around the quotes, or padding, etc., please review this thread here.
Forum: Fixing WordPress
In reply to: Add height Code to this PHP code?I’ve got it!
<center><?php ?><div style="min-height: 320px; padding-top: 20px; padding-left: 20px; padding-right: 30px;"> <?php $file = "/home/public_html/path/to/random-quotes.txt"; $quote = file($file); echo $quote[array_rand($quote)]; ?></div></center>
As you can see, I added more than just the height.
Whether or not this is considered “right” or “proper” use is beside the point for me; the main point is that this is working and doing exactly what I want it to do.
Thanks!
Forum: Fixing WordPress
In reply to: Code for calling and randomizing contents of a .txt?I have found my answer here in those post, which led to this site containing the answer.
For ease, I’m re-posting that code here:
<?php $file = "/home/public_html/path/to/random-quotes.txt"; $quote = file($file); echo $quote[array_rand($quote)]; ?>
With this solution, you upload your text file to your file manager, and then put your pathway to that text file in place of the one above.
Thanks for the info everyone!
P.S. Even though that code basically has “quote” in it, it also works for other things, like banner ads. Even if it’s not the “best” solution, it is working.
Oh yeah, I also found this solution, but it does not call from a text file though so you’d have to have everything you want to randomize directly in your php file.
Forum: Plugins
In reply to: Seeking PHP code for Random Quotes in sidebarThank-you!!
Forum: Themes and Templates
In reply to: Code for Custom SidebarsThanks for the info…I’ll give that a try.
Forum: Themes and Templates
In reply to: Code for Custom SidebarsWell, I later learned that for whatever reason, using the above code from my last post somehow affected all of my sidebars on all of my pages, so I went back to listing them individually.
Oh, and I learned more about how to do custom sidebars for my category/archive ‘pages’ here.
Forum: Fixing WordPress
In reply to: Custom sidebar for each page of an archive or category?Well, I don’t know how to do the above suggestion, but through a lot of other searching around, I found a completely different idea (by accident) that I will utilize instead of trying to track down this specific answer.
I went in to my WordPress reading settings and changed the number of posts to show per page at a very high number. Initially, I had it set to view one blog post per page.
Next, I learned about the
<?php the_excerpt(); ?>
code from this codex article.
I replaced the the_content with the_excerpt in my archive php file (which I think is category php file for some of you). I also replaced the get_content with the_excerpt in my index php file as well. Having the_excerpt in my archive php file is making all of my blog posts in my categories/archives appear as excerpts. Having the_excerpt in my index php file is making all of my search results appear as excerpts as well. Plus, it made it so that the page I have all of my blog posts appear on show all of the posts as excerpts instead of the full articles.Then, in order to have a ‘read more’ link at the end of the excerpt, I learned about this function from this article that needs to be placed in to your functions php file. I put it at the bottom of the functions php file, and changed the text it displays.
The other good thing about stumbling upon this solution instead of finding what I was originally looking for above is that it eliminates the potential possibility of Google viewing me as maybe having ‘duplicate content’. With the full articles previously appearing under all of those different url’s, I read on some forums that there’s a debate out there as to whether or not Google would consider that duplicate content even though it’s all on the same site.
So, this solution as I’ve described it should hopefully eliminate that possibility since now the full article should be appearing in only one place on my site.And, since my categories/archives will now appear on only one page, I should be able to make my above code structure work with the
is_category( '9' )
conditional tag as described here.I will now mark this topic as resolved since this is the solution that I have instead come up with.
If anyone wants to learn more about how I made my custom sidebars, feel free to read this information.
Thanks.
Forum: Fixing WordPress
In reply to: Custom sidebar for each page of an archive or category?I don’t know enough about code to understand what you are referring to. I don’t know what you mean by test against..?
Do you mean add that piece of code in some way to my above code?
Forum: Fixing WordPress
In reply to: Custom sidebar for each page of an archive or category?Ok, thanks for the additional information.
Is there a way to target each page instead?
I do want one specific sidebar on that first page, but then I’m looking to have a different sidebar displayed on the second page, and so on.
Thanks!
Forum: Fixing WordPress
In reply to: Custom sidebar for each page of an archive or category?Ok, thanks, I tried that:
<?php if (is_paged('category/communication/page/4')) : ?> <?php get_sidebar('custom_sidebar'); ?> <?php else : ?> <?php get_sidebar(); ?> <?php endif; ?>
And
<?php if (is_paged('article-slug-100')) : ?> <?php get_sidebar('custom_sidebar'); ?> <?php else : ?> <?php get_sidebar(); ?> <?php endif; ?>
But, that did not work either.
This article states is_paged() also does not accept any parameters.
Is there something that can be altered so that the is_paged() can work, or will it not work since that Codex says it doesn’t accept parameters?
This is perplexing.
Would you happen to have another idea for me to try?
Thanks!
Forum: Fixing WordPress
In reply to: Custom sidebar for each page of an archive or category?Thank-you; yes, that does work for the entire category.
But, how do I make it so that the 1 sidebar appears on only one and only one page of the communication archives and not all of the communication archive ‘pages’?
Basically, how I specifically target only one ‘page’/’article’/’post’ out of all the ‘pages’/’articles’/’posts’ of the communication archives?