lola rennt
Forum Replies Created
-
Forum: Plugins
In reply to: Code to highlight current tag results in blank admin pageJust did that, found two errors involving the_tag template. Apart from that all good. Thanks for helping out!
Forum: Plugins
In reply to: Code to highlight current tag results in blank admin pageI found it! Thanks to this topic.
Exactly the same silly solution. I had pasted two codes in closing and ending tags… Could it really be that that caused the problem?It works fine now…
Thanks Alchemyth, this code works even better than the one I had! Genius!
Forum: Plugins
In reply to: Code to highlight current tag results in blank admin pageHello alchymyth!
Thanks for the reply. This code works indeed but again it turns my admin page blank…
I made a custom theme from this quiet old 1024px theme.
I have no idea what this might cause. I checked the other codes in my functions.php, they do not seem to make the problem. Neither do the plugins.
Probably some code of mine which had problems…?Thanks again!
Forum: Themes and Templates
In reply to: Display monthly archives in numbers (01.08.2013)I solved this problem by creating a list of posts using the get_posts tag and displaying only the_date from the posts. A little work around and not ideal, but it did the trick!
<ul> <?php $IDOutsideLoop = $post->ID; global $post; $args = array('numberposts' => 3 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <li <?php if(is_single() && $IDOutsideLoop == $post->ID) {echo " class=\"current\"";}?>><a href="<?php the_permalink(); ?>"><?php the_date('d.m.Y'); ?></a></li> <?php endforeach; ?> </ul>
Forum: Themes and Templates
In reply to: Conditional statement check if post has thumbnailOkay, I got this code now:
<?php if ( function_exists( 'dp_post_thumbnail' ) ) { dp_post_thumbnail(); } else { the_excerpt(); } ?>
And this code correctly checks wether or not the post has a thumbnail attached to it. But still it will no return the excerpt if the has no thumbnail. And that is what I would like to achieve. How can I do that?
Forum: Themes and Templates
In reply to: Question on theme set-up – Indexhibit like themeOkay, I got it to work. I used some detours but it works fine. I will try to explain shortly what I did.
Note: In my theme I use three categories, but I if you have many more categories this could get complex. Still the methodology would work and I hope this sets other people on the right track.
Using the option of variable sidebar content I set up three sidebars, each for one category. Using a custom query I defined what category should be displayed:
<?php $args = array( 'numberposts' => 100, 'orderby'=> 'post_date', 'category' => 4 ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?>
Then I set up three different category templates (these are called when clicking on a category), again, one for each category and I used this code to get the correct sidebar:
<?php include(TEMPLATEPATH . '/sidebar-cat-yourcat.php');?>
Then on my single.php I added this conditional statement:
<?php if ( is_category('yourcat') || @$_REQUEST['cat'] == yourcatID ) { include 'sidebar-cat-yourcat.php'; } elseif ( is_category('yourcat') || @$_REQUEST['cat'] == yourcatID ) { include 'sidebar-cat-yourcat.php'; } elseif ( is_category('yourcat') || @$_REQUEST['cat'] == yourcatID ) { include 'sidebar-cat-yourcat.php'; } else { include 'sidebar.php'; } ?>
And finally I added this tiny code to the title attribute of the post data after the custom query in ALL the sidebars:
<a href="<?php the_permalink() ?>?cat=yourcatID" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
note the ?cat=ourcatID which displays the correct url after visiting a category archive and then clicking on a post. It links to the single.php and retains the sidebar selection by calling the correct sidebar using this url:
https://localhost:8888/yoursite/?p=11?cat=5I hope this makes it clear to you and other people. If you have any questions, feel free to ask.
Forum: Themes and Templates
In reply to: Variable sidebar content troubleCan somebody help me?
Forum: Themes and Templates
In reply to: Variable sidebar content troubleBasically I would need something like wordpress/archive/category/single
I know this does not exist, but how can I tell my sidebar that if the single.php is reached from a category archive it should retain that specific sidebar for the categoyr archive?Any help is welcome, even just a simple direction.
Forum: Themes and Templates
In reply to: Conditional tags with Single.phpOn the template hierarchy you check what kind of templates WordPress will take.
WordPress will not take single-cat.php. Instead you could use a conditional tag on your single.php to check what category the post is in and then change the stylesheet according to the category.
Something like you can read here.Forum: Themes and Templates
In reply to: Question on theme set-up – Indexhibit like themeYeah, I checked the theme development and many more pages before posting here. I hardcoded already 3 themes for this job but it just seems a functionality that doesn’t work that well with WordPress. Still I need to get the job done soon…
Anyone suggestions?
Forum: Themes and Templates
In reply to: Question on theme set-up – Indexhibit like themeOkay, I have managed so that the single post page displays the posts from that same category in the sidebar. But still this is not what it should do.
Ultimately I want it to work so:
– when on index.php -> display all posts in sidebar, when you click on a post it shows the post in the right part of the screen and it retains the list of ALL the posts in the sidebar– when in category archive -> display all posts of the category in the sidebar, when clicking on a post it shows the posts in the right part of the screen and it retains the list of the posts of that category in the sidebar
This seems really simple behaviour, but it seems unachievable with WordPress. I am beginning to think that I just need to use a simple javascript show hide so that I don’t need to jump to the single.php page, because that is what troubles the whole thing.
Any ideas, comments, suggestions?Forum: Themes and Templates
In reply to: Which portfolio theme most user friendly?Some really simple nice themes over here. And not too expensive!
Forum: Themes and Templates
In reply to: Massive comment box after submittingHi,
in the style.css file adjust this the height of the .outer-comment to 28px instead of 100%. See below..comment-list .outer-comment, .comment-list .children .outer-comment { background: none repeat scroll 0 0 #F7F7F7; display: table; height: 28px; overflow: hidden; position: static; width: 100%; }
Hope it helps!
Gr – LForum: Themes and Templates
In reply to: trouble with line spacingHello,
in the style.css file you can adjust the line-height of .post h2.title – see code below. I just did it with firebug and it worked.
.post h2.title { line-height: 34px; }
Hope it helps!
Gr- LForum: Themes and Templates
In reply to: Question on theme set-up – Indexhibit like themeI am already half on the way – when completely ready I will make the theme downloadable. So you can use it.
For now I have managed to display the posts in the sidebar by pasting the loop in there. If you click on a category it also rightfully selects only the posts from that category in the sidebar.
My problem now is that when I click on a post it directs me to a single post page and the sidebar displays only that single post.The funny thing is that I have no single.php page… So I don’t understand why it does this.I want to keep all the posts in the sidebar but just have the content of the active post displayed too. This must be pretty easy – any ideas on how yo do this?