skaufmann
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: page navigation within category leaves current categoryI had no specifics other than when I disabled the plugin, the inter-category page navigation worked properly. I notified the developer of cforms and he quickly gave me a beta which worked. The beta is now part of the stable release from a number of releases ago so if you have the latest cforms it shouldn’t be a problem.
If you don’t have cforms it might be another plugin stepping on the code. Disable all your plugins and check it. If it works enable one at a time (or small group) and test till it breaks. You’ll find which one is breaking it.
Forum: Plugins
In reply to: Display posts and gallery of post attachments seperatelyI also just added the following code to the Title in my header.php so that the title of the post when viewing the gallery filter, has “Gallery: ” added to it.
if (is_front_page()){ echo 'KarieandScott.com - A blog of our European Adventure'; }else{ $att = $_GET["att"]; if ($att=="yes") echo 'Gallery: '; wp_title(''); echo ' | '; bloginfo('name'); }
Forum: Plugins
In reply to: Display posts and gallery of post attachments seperatelyI might have had the same problem. Start a new thread and post a link to it here. I think it would be appropriate as it’s a different problem. I’ll post my category template there too.
Forum: Plugins
In reply to: Display posts and gallery of post attachments seperatelyYou’re site isn’t loading so I can’t see what is wrong. Just curious though, if it’s your code, shouldn’t you be able to figure it out? Not that I won’t try to help…
Forum: Plugins
In reply to: Display posts and gallery of post attachments seperatelyNo I used a modified version of the code I posted a link to in my second post above. The photo album feature is not built into WP. I suspect there will be some version of it in the future but this works well for now.
Forum: Fixing WordPress
In reply to: page navigation within category leaves current categoryAlright, I’ve found the culprit. CForms.
After submitting a trac and help from a developer it was determined to be CForms.
I am resolving this and opening a new post under CForms.
Forum: Plugins
In reply to: Display posts and gallery of post attachments seperatelyI tackled one of my improvements
-Add View Post and View Gallery links to the post.
For every post I add the Photo Gallery category to, not only does it add it to the photo gallery page, it also adds a “View Gallery” icon in the upper-right of the post. When you are viewing a post’s gallery, there is a “View Post” icon in the upper-right.
See this post for the example:
https://www.karieandscott.com/blog/the-running-of-the-crazy-people-oh-yeah-and-bullsHere is what I did it:
Modified single.php and index.php with the following:I moved
$att = $_GET["att"];
(see first post above in this thread) from the loop and put it before the loop since I was calling this variable more than once. I now have<?php $att = $_GET["att"];?>
just before the loop starts. This allows me to use the URL variable at any time to filter my post view.To add the buttons, I first created the buttons then added the following code just after the Title in the loop:
<?php if ( in_category(52) ){ echo '<a href="'; echo the_permalink(); if ($att=="yes") echo '"><img class="viewphotos" src="https://www.karieandscott.com/blog/wp-content/themes/blossom/images/viewpost.gif"></a>'; else echo '?att=yes"><img class="viewphotos" src="https://www.karieandscott.com/blog/wp-content/themes/blossom/images/viewphotos.gif"></a>'; }?>
The
if (in_category(52)
code looks to see if the post being compiled by the loop is in the Photo Gallery category, if it is then it looks for the$att
variable in the URL. If it is yes then it means the current view is the Gallery view and the “View Post” button should be display. If$att
is not yes then the view is the Post view then the “View Gallery” button is displayed and the link has?att=yes
added so the view will be filtered to the gallery when clicked on. I updated my CSS to help place the icon where I want it.I also added
<?php if ($att=="yes") echo 'Gallery: ';?>
just before the title so if the gallery is viewed, the title has “Gallery: ” added to the title.Forum: Fixing WordPress
In reply to: Make something only show on post, not on main page?Yes, echo sort of means “print this”. Only non-php can go there such as HTML or text, if you want more PHP in the middle of your echo you need to end the echo, insert PHP, then start the echo again to print the rest of your content all between the { } brackets.
If you need that and can’t figure it out, just post it here. I’ll take a look at it.
Forum: Fixing WordPress
In reply to: Make something only show on post, not on main page?Moshu, but it looks like the subscribe content is in his sidebar. If you don’t want something to show just on the main page but everywhere else you will probably want to us something like is_front_page(). Your code would look something like
if (is_front_page()){ echo ''; }else{ echo 'whatever you want returned here'; }
If I understand the conditional correctly, this will echo nothing if it is front page and return your promo if any other page, such as page 2 of your blog,.
Forum: Themes and Templates
In reply to: Next/Previous Links not workingI’m having a similar problem but in my case my nav links when viewing a category strip out the category info form the URL and it goes to the next page of the main archive.
When I go to
https://www.karieandscott.com/blog/category/gallery
and select next page, it goes to
https://www.karieandscott.com/blog/page/2
rather than
https://www.karieandscott.com/blog/category/gallery/page/2I’ve been going crazy to figure this out. I have no idea when it started.
Forum: Fixing WordPress
In reply to: Make something only show on post, not on main page?Down about 3/4 of the page there is a is_single code example. You’ll want to use something like this where you want the content to show up:
if (is_single()) { echo 'This is just one of many fabulous entries in the ' . single_cat_title() . ' category!'; }
I’m not completely familiar with them either but it’s not too complicated. Play around with it and you’ll figure it out.
Forum: Fixing WordPress
In reply to: Showing only certain categories on front pageThis may be your best option
https://www.ads-software.com/extend/plugins/advanced-category-excluder/It will allow you to exclude categories from multiple places, including your RSS. I use the the code above to exclude from my homepage but it still showed in my RSS. This plugin works for this.
Forum: Fixing WordPress
In reply to: Make something only show on post, not on main page?This also might be a bit more valuable
https://codex.www.ads-software.com/Conditional_TagsForum: Fixing WordPress
In reply to: page navigation within category leaves current categorybump… please anyone?
Forum: Fixing WordPress
In reply to: How to make PHOTO ALBUMS using WP2.5’s photo media tool?Yeah, you’re right Evita. It’s important to note that the organization needs to be different to execute this, at least different from what Skunker is trying to do.
You’ll need to upload each set of photos that you want to show up in the [gallery] into a single post. Each post will be a unique gallery. Mark each gallery post with a Gallery category. Create a gallery category template and with a new loop in the template you can list all your galleries in order. See:
https://php.pastebin.com/m59ac961eI had a more complex need as I have have posts and photos that go together. My posts are longer and sometimes I have a lost of photos. I also didn’t want to gallery collection to link to the post and show text, just the photos. I cam up a with a simple hack that *filters* out the photos or the post depending on where the post is viewed. Here is my hack
https://www.ads-software.com/support/topic/191230Good luck