Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Eiirp

    (@eiirp)

    This is for an own theme based on the Bones HTML5 Theme.

    Thread Starter Eiirp

    (@eiirp)

    Hello, thanks. I already read about this memory stuff, but didn’t really get it. What kind of memory is it exactly? And on which setting to put the memory? I’ve seen something about 64M, 256M, etc.

    Thanks!

    Thread Starter Eiirp

    (@eiirp)

    Hello,

    I tried to work with the tag template, but it seems the filtering by a certain tag and my way of specifying which categories to display don’t work together.

    – I have two different loops for #content1 and #content2, called loop.php and loop-music.php

    – They get called by get_template_part( ‘loop’, ‘music’ ); and get_template_part( ‘loop’, ‘index’ );

    – Each of them has a modification to the post query like:

    <?php
    
    // The Query
    $the_query = new WP_Query( 'cat=-3' );
    
    while ( $the_query->have_posts() ) : $the_query->the_post();
    
    ?>

    Either excluding cat3 or just querying for cat3.

    After the loop, the wp_query is resetted:

    <?php
    // Reset Post Data
    wp_reset_postdata();
    ?>

    This works fine on the regular page. To have this separation in the tag archive, I told the tag.php to load loop.php and loop-music.php aswell. But unfortunately, the filtering by tags seems to get lost.

    Which way could I filter the tags and keep this separation of categories for the two different loops?

    Thanks!

    Thread Starter Eiirp

    (@eiirp)

    I already found a solution. Apparently archives get displayed as excerpts by standard. This will hide the SoundCloud players.

    –>

    Perhaps you are looking to cut down on the size of your Tag pages. You could do this by displaying excerpts rather than the entire content of each Post. To do this, you will just need to find where it says the_content() inside The Loop in your Template, and replace it with the_excerpt(). These will most likely be inside PHP tags:

    <?php the_excerpt(); ?>
    and
      <?php the_content(); ?>
    Thread Starter Eiirp

    (@eiirp)

    In general I will have “Music” posts in the right column and all other categories in the left column. The tags, I’d like to use for having a list of all Music-Artists (All “Music” posts would be tagged with their specific artist). By clicking on a Artist (Tag), just these tagged posts should be shown. –> Left column would be empty this way because there won’t be any tagged posts besides “Music” posts.

    But it would be good, to have this filter to affect both columns. So the columns simply divide into Music or not and the filter controlls which posts will be shown.

    I’m pretty new to wordpress and don’t know how to work with a filter like that and where to put it. So any help would be helpful!

    Thanks!

    Thread Starter Eiirp

    (@eiirp)

    Thanks, works good so far.

    What I did:

    index.php:

    <div id="container">
    			<div id="content1" role="main">
    
    			<?php
    			/* Run the loop to output the posts.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-index.php and that will be used instead.
    			 */
    			 get_template_part( 'loop', 'index' );
    			?>
    			</div><!-- #content -->
    
                <div id="content2" role="main">
    
    			<?php
    			/* Run the loop to output the posts.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-index.php and that will be used instead.
    			 */
    			 get_template_part( 'loop_music', 'index' );
    			?>
    			</div><!-- #content -->
    		</div><!-- #container -->

    Modification to loop.php:

    <?php
    query_posts("cat=-3");
    while ( have_posts() ) : the_post(); ?>

    <?php wp_reset_query(); ?>

    loop_music.php:

    <?php $my_query = new WP_Query('category_name=Music');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID; ?>
    
    // Do stuff
    
    <?php endwhile; ?>

    So, now I have every post except the category “Music” (3) in #content1 and every post of category “Music” in #content2

    I need to be able to filter by tags. How could I have a list of my tags (just as the category list) and by clicking a tag, just the related posts will be displayed, but stick to their column?
    I would like to stick to the two-column layout all the time and not have a single page loaded with all the tagged posts.

    Thanks a lot!

    Thread Starter Eiirp

    (@eiirp)

    Hello, thanks so far!

    So I’m gonna create a child-template and put a customized index.php in it. I got the part on how to ask the loop for different outputs, but I’m not sure how to exactly use it together with the index.php.

    Let’s say I arrange two DIVs in the index.php, left #container1 and right #container2. Should I then create two loop files, loop.php and loop2.php with different queries and load each into one container?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)