esferapublica
Forum Replies Created
-
Forum: Plugins
In reply to: sobeks posts in category plugin, highlight active postbtw:
the output of sobeks plugin is a simple list like:
<ul> <li><a href="www.mydomain.com/?p=29">Intro</a></li> <li><a href="www.mydomain.com/?p=44">Aufgabenstellung</a></li> </ul>
Forum: Themes and Templates
In reply to: Conditional tag asking for parent categorythat’s confusing. if there is a possiblity to read out the subcategory ID, there has to be some way to find out the parentcategory ID.
anbody an idea how to script this???
PS: it doesn’t work just to edit the single.php, because i need several different templates, and not just one.
Forum: Themes and Templates
In reply to: Conditional tag asking for parent categorysorry, this still doesn’t work.
I try to explain it better and with online examples:
I have a list of posts on a category-ID.php page. In this case the list of posts is ?Intro? and ?Aufgabenstellung? on the left column of the content box.
?cat=11When I click on one post it obviously opens in the index.php template.
?p=44I want it to open in the category-ID.php of the parent category, that it looks like this again.
?cat=11So what I need/tried:
I made a single.php and added Conditional Tags which asked the following:
If this post is in parent category X, include this template, elseif this post is in parent category Y, include that template.
In the conditional tags I just found the term:
if (in_category(4) ) {
which doesn’t work for me, because it just asks for the category of the post, and not the parent category. I can’t use this, because I’m constantly adding a lot of subcategories with different IDs, and can’t always add them in the code. The only thing that is fix, is the parent category. Thats why the thing you posted doesn’t work, because I again would have to add the ID of the subcategory in my code, which I not always know.Phuu, I hope i suceeded to kind of make this clear. Sorry, if this is a little bit confusing. But I hope somebody could help.
Thanks a lot, Karina
Forum: Themes and Templates
In reply to: Conditional tag asking for parent categoryHey MichaelH,
I’m not sure if I got that thing with the array right. 15,20,233 are the parent categories? If so: I tried to write: (3 is the parent)
if (in_category( array( 3 ) ) {
but it didn’t work.
The problem is, I have about 10 dynamic subcategory ID’s that are going to change constantly. That’s why I just can define the parent category as a fix parameter. The rest I practically don’t know.
Sorry, as I said, my knowledge in PHP is very basic. : /
thanks, Karina
Forum: Plugins
In reply to: Smarter Navigation from index pageis there any solution to this? any ideas?
Forum: Plugins
In reply to: Smarter Navigation from index pagehello scribu.
I’m not sure if I understand what you mean, the post actually IS in the subcategory.
bye, ka
Forum: Plugins
In reply to: Smarter Navigation from index pagejust to give some details:
?design? is the parent category. the subcategories within i want to navigate can be seen in the sidebar. it works, if i click on them. but coming from the startpage, he just navigates in the parent category, not within the subcategory.
bye, ka
Forum: Plugins
In reply to: Smarter Navigation from index pageHello scribu,
thanks again, wow, super fast.
these are the lines i coded:<?php next_post_smart('%link', 'NEXT >', TRUE); ?> <?php next_post_link('« %link', '%title', true); ?>
he’s actually giving me the exact same link.
you can see our site here. If you click on the startpage on the first big picture, you get to the single post. if you scroll down there, on the right lower corner you can find the links.
thank you! karina
Forum: Plugins
In reply to: Smarter Navigation from index pageHello scribu,
Thank you for your reply. I’m sorry, I just updated to 1.2.1 and it still doesn’t seem to work. I’m clicking on a post on the index page, when I click on ?next post? he still doesn’t stay in the same category. Just after I clicked on a category once and then click on a post.
Is there a way to fix this? Maybe using Conditional Tags for my three categories?
Thanks for your help again, Karina
same problem here, anybody an idea?
Forum: Themes and Templates
In reply to: secondary category templateOk, I’m still not sure how to do the thing with the secondary template, but I solved my problem now using my search template.
The search template showed all my posts from one category.
see my solution in another topicForum: Themes and Templates
In reply to: whole category as search resultproblem solved:
to give me all posts from one category as a search result i just have to create the link with
<a href="https://mydomain.com/blog/?s=+&cat= <?php $category = get_the_category(); echo $category[0]->cat_ID; ?>"> thats my link </a>
My result was this right link:
https://mydomain.com/blog/?s=+&cat=7Forum: Themes and Templates
In reply to: whole category as search resultthats actually how i create the link until now, but – as i wrote – it’s wrong, because he doesn’t give me the search results for everything in category 7, he just is searching for the nr. ?7?.
<a href="https://www.mydomain.com/blog/?s=<?php $category = get_the_category(); echo $category[0]->category_parent; ?>"> show all </a>
Forum: Themes and Templates
In reply to: whole category as search resulthello nsathees,
thanks, for your reply. but with this template tag i just get a list of my categories. I need one link (in this case: ?show all?) to all posts from one category in my search result template. actually like a search, just without the search field and the submit button. just the link.
sorry, if this is confusing. i try to make it as clear as possible. :/
Forum: Fixing WordPress
In reply to: More tag links to start pageI need help, please. Nobody had the same problem?