• Forum
  • FAQ
  • Docs
Notice: In order to post a support question you have to have an account and be logged in.
Register  or  Login
  1. Hi,

    1. I would like to add titles to each category page. When you click in sidebar a category, you open a page with all posts with this category but without a title.

    I need this page with his own tittle. Is it possible?

    2. In each entry you have the title and in the end of the post the author.

    I would like to add behind post title some stuff:

    Title

    Category

    Author (this I think i can, not sure)

    Tags (I think this is not possible, isn´t it?. This is less important)

    Main problem I need this is because I have tons of entries and I need to catalog them easily

    Thanks in advance

    kaleen
    11 months ago
  2. Hi,

    0I would like to add titles to each category page. When you click in sidebar a category, you open a page with all posts with this category but without a title.

    Fint this code in the archive.php file:

    <div <?php tfuse_class('content'); ?>>
    

    Under this code add this code:
    <div><h1> <?php single_cat_title(); ?> </h1></br></div>
    

    2. In each entry you have the title and in the end of the post the author.

    Find this code in the content-single.php file:

    <h1><?php the_title(); ?></h1>
    
        <div class="entry">
    

    and below this code:
    <?php
            foreach((get_the_category()) as $category) {
                echo $category->cat_name."\t";
            }
            ?>
            </br>
        <em><?php _e('by ','tfuse'); ?><span class="author"><?php the_author_posts_link() ?></span></em></br>
    
            <?php
                echo "<p>". the_tags()." </p>";
            ?>
    
            <div class="clear"></div>
    

    Cheers,
    George

    George
    11 months ago
  3. Thanks George

    Only one thing, if you see the categories in a sigle entry, they are with links, only in text format.

    Would be possible with their links?

    Thanks in advance

    kaleen
    11 months ago
  4. I would need the categories names (and links) below name at this format:

    some text category1, category 2, category 3

    kaleen
    11 months ago
  5. And last question about this,

    ¿Is it possible, in this context we are speaking about, to hide a category?

    I would like to hide (in post, below post name) the main category to list all blog posts (in this case named as "blog")

    Or is it possible to have an index page in blog section without adding a category to all pages?

    Thanks

    kaleen
    11 months ago
  6. Hi,

    Only one thing, if you see the categories in a sigle entry, they are with links, only in text format.

    I don't really get what you want to say.Please provide more information about this.

    I would need the categories names (and links) below name at this format:
    some text category1, category 2, category 3

    Replace the code provided above with this code:

    <?php
            echo "SOME TEXT: ";
            foreach((get_the_category()) as $category) {
                $category->cat_name = strtoupper($category->cat_name);
                if ($category->cat_name !="BLOG")
                    echo $category->cat_name.",\t";
            }
            ?>
            </br>
        <em><?php _e('by ','tfuse'); ?><span class="author"><?php the_author_posts_link() ?></span></em></br>
    
            <?php
                echo "<p>". the_tags()." </p>";
            ?>
    
            <div class="clear"></div>
    

    Replace the SOME TEXT to the text you need.

    Cheers,
    George

    George
    11 months ago
  7. Sorry George,I wrote it bad..

    Only one thing, if you see the categories in a sigle entry, they are withOUT links, only in text format.

    I will add this new code.

    Thanks!

    kaleen
    11 months ago
  8. Added, but same problem. Just plain text, not with links.

    kaleen
    11 months ago
  9. Other question, listing tag page, where is the php page to retouch it?

    I would like to:

    · Retouch the div of the title of the page

    · Add a sidebar (as rest of blog)

    Thanks in advance

    kaleen
    11 months ago
  10. And last question about this,

    In the main blog window, listed with the category "blog",

    Is it possible to add an exception and instead list the name of the category (in this case "blog"), list a personalized div on title?

    Basically, in home blog page I would like to add a different title.

    Thanks in advance

    kaleen
    11 months ago
  11. Hi,

    Added, but same problem. Just plain text, not with links.
    Replace the previous code provided be me with this to get the categories link:

    <?php
            echo "SOME TEXT: ";
            foreach((get_the_category()) as $category) {
                $category->cat_name = strtoupper($category->cat_name);
                if ($category->cat_name !="BLOG")
                    echo '<a href="'.get_category_link(get_cat_ID( $category->cat_name )).'">' . $category->cat_name.'</a>'.",\t";
            }
            ?>
            </br>
        <em><?php _e('by ','tfuse'); ?><span class="author"><?php the_author_posts_link() ?></span></em></br>
    
            <?php
                echo "<p>". the_tags()." </p>";
            ?>
    
            <div class="clear"></div>
            <?php tfuse_media(); ?>
            <?php the_content(); ?>
            <div class="clear"></div>
    

    Other question, listing tag page, where is the php page to retouch it?
    What is wrong with the with the page title?

    Please refer next video:How to add sidebar

    Is it possible to add an exception and instead list the name of the category (in this case "blog"), list a personalized div on title?

    Go to Appearance -> Menus, in the menu structure find the Blog module, extend the tab and change the Navigation Label field text to the one you need.

    Cheers,
    George

    George
    11 months ago
  12. Go to Appearance -> Menus, in the menu structure find the Blog module, extend the tab and change the Navigation Label field text to the one you need.

    I changed it but it´s the same, in the index blog page (named as blog) is still the title :S

    kaleen
    11 months ago
  13. Ahh! OK OK, solved! :) Changing the name of the category and keeping the name in the menu

    kaleen
    11 months ago
  14. BUT I think ther a little problem.

    Is it possible to have a blog url like this?

    http://www.mydomain.com/blog

    instead of: http://www.mydomain.com/category/category

    kaleen
    11 months ago
  15. Categories title: solved

    Categories at single entries (as tags below entry texts): Not solved:

    This code doesn´t work properly:

    <?php
            foreach((get_the_category()) as $category) {
                $category->cat_name = strtoupper($category->cat_name);
                if ($category->cat_name !="BLOG")
                    echo '<a href="'.get_category_link(get_cat_ID( $category->cat_name )).'">' . $category->cat_name.'</a>'.",\t";
            }
            ?>
    kaleen
    11 months ago
  16. Hi,
    if you would like to display categories from where the post is then you can use this code:

    <?php the_category(', ') ?>
    

    Cheers,
    Max.

    Max
    11 months ago
  17. Perfect! and to finish,

    How to hide one category?

    Need to hide main category to list all entries. Before named "blog", now "todas las entradas" (all entries)

    kaleen
    11 months ago
  18. In this case you would have to use this code:

    <?php
    foreach((get_the_category()) as $category) {
        if ($category->cat_name != 'cat_to_exclude') {
        echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> ';
    }
    }
    ?>
    

    You can adjust it to your needs.

    Max
    11 months ago
  19. Ok. Thanks

    kaleen
    11 months ago
  20. George, I add that code but I think It doesn´t work properly:

    Parse error: syntax error, unexpected T_IF in /home/oitaqmvk/public_html/wp1/wp-content/themes/medica-parent/content-single.php on line 35

    I add:

    ` <?php
    foreach((get_the_category()) as $category) {
         if ($category->cat_name != 'inicio') {
         echo '<a>term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> ';
    }
    }
    ?>`

    I replaces 'cat_to_exclude' by 'Todas las entradas', or 'inicio' but does not work.

    The category I want to hide is main to list the blog home:

    ID=4 (in permanent links, now pages are set as ID, but in the end with the name of pages)

    Name: Todas las entradas

    Slug: inicio

    And in menus it is added as Blog

    Thanks in advance

    kaleen
    11 months ago

12


Add Reply

You must log in to post.

 

Add a new topic!

Chances are your issue is already answered, but if it’s not, you can always create a new topic.

Add new topic

Search forums

Searching for something specific? Type something and press Enter to search.