Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter mowhaa

    (@mowhaa)

    Well my site blog1 has already a lot of people. I get around 300K pageviews a day.

    I want blog2 which I started new to be able to access the database blog1 uses.

    I already looked at that and it wasn’t much helpful.

    Thread Starter mowhaa

    (@mowhaa)

    <?php
    $current_cat = get_query_var( 'cat' );
    $categories = get_categories('orderby=id&order=desc&number=10');
    foreach($categories as $category) {
    echo '<div class="latestanime"><div class="title"><a href="' . get_category_link( $category->term_taxonomy_id ) . '">Watch ' . $category->name.' Online</a></div><p>'. $category->description . '</p></div>'; } ?>

    With description.

    Thread Starter mowhaa

    (@mowhaa)

    I got it to show like this

    <?php
    $current_cat = get_query_var( 'cat' );
    $categories = get_categories('orderby=id&order=desc&number=10');
    foreach($categories as $category) {
    echo '<div class="latestanime">'; ?><?php the_post_thumbnail(array( 160,100 ), array( 'class' => 'primary' )); ?><?php echo '<div class="title"><a href="' . get_category_link( $category->term_taxonomy_id ) . '">' . $category->name.'</a></div></div>'; } ?>

    However, the thumbnail image attached to the category does not show

    Thread Starter mowhaa

    (@mowhaa)

    I fixed it. Thanks for your help!

    Thread Starter mowhaa

    (@mowhaa)

    I have another problem. I tried this

    <?php if (is_category('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z')) : ?>

    However that doesn’t work. How can I make it check the category so if it’s category “A” category A content and If it’s category “B” then it will display category “B” contents. Or would I have to individually do it for each category like

    <?php if (is_category('A')) {
    echo 'A';
    } elseif (is_category('B')) {
    echo 'B';
    }
    ?>
    Thread Starter mowhaa

    (@mowhaa)

    Worked a charm. Thanks for the help 😀

    Thread Starter mowhaa

    (@mowhaa)

    Like are there any If statements?

    If (user_level == ['1']) {
    
    echo 'this';
    
    } else {
    
    echo '';
    
    }

    Something like that?

    Thread Starter mowhaa

    (@mowhaa)

    For example post “Action Movie” is associated with the tag “Action” and is set to the category “Category 1”. 2nd Post “Action movie 2” is associated with the tag “Action” and is associated with the category “Category 1”. Third post is “Nice movie” and has the tag “Action” but is associated with the category “Category 2”. I’m using the tags as Genres. So when the tags display on the post “Action Movie” and someone clicks the tag “Action” they’ll be taken to the tag page. And I want it to list like this:

    Results for Action Genre:

    Category 1

    Category 2

    However, instead of doing that it does this:

    Results for Action Genre:

    Category 1

    Category 1

    Category 2

    And the description that I am trying to display is the description of the category itself. However, the description I may just remove it cause I don’t require it.

    Thread Starter mowhaa

    (@mowhaa)

    It’s used within the loop, but I’m not sure. Here’s the pastebin link http://pastebin.com/BAWtsjsP thanks(:

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