Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1246933
    sandra.i
    Participant

    Hello

    I would like to add a list of categories in the header I have in my blog index page, could you help me with that please?

    #1246937
    sandra.i
    Participant

    My page is here:

    http://www.rochesterclinic.co.uk/news/

    I have written some of the categories in, but it would be great if that was dynamic and styled with the right font.

    I someone was helped with this issue, but I couldn’t get that code to work, even changing ‘integrity’ to ‘renew’, as I am using the renew stack.

    I would be grateful for your help.

    #1246943
    sandra.i
    Participant
    #1246994
    Christian
    Moderator

    Hey there,

    The code provided serves only as a guide and not a complete solution. Please follow the suggestion stated in the thread. You’ll need to modify it to make it work on your setup. Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/

    Thank you for your understanding.

    #1247015
    sandra.i
    Participant
    This reply has been marked as private.
    #1247101
    Christian
    Moderator

    Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer.

    Thanks for understanding.

    #1247136
    sandra.i
    Participant

    Ok could I perhaps use the category widget? The widget displays the categories as a long list – could I have that list going across instead, over the width of the page?

    #1247239
    Joao
    Moderator

    Hi There,

    Where exactly you have placed the category widget so we can take a look, would you mind providing the URL and pointing it to us?

    Thanks

    Joao

    #1247587
    sandra.i
    Participant
    This reply has been marked as private.
    #1247807
    Darshana
    Moderator

    Hi there,

    You can style them according to your requirement. Basically you can use the following example code to list the categories and then modify it according to your requirements.

    
        $categories = get_categories( array(
          'orderby' => 'name',
          'parent'  => 0
        ) );
        
        foreach ( $categories as $category ) {
            printf( '<a href="%1$s">%2$s</a><br />',
                esc_url( get_category_link( $category->term_id ) ),
                esc_html( $category->name )
            );
        }
    

    Thanks!

    #1248410
    sandra.i
    Participant
    This reply has been marked as private.
    #1248454
    Paul R
    Moderator

    Hi,

    You need to put the code in a php fie.

    Thanks

    #1248598
    sandra.i
    Participant

    ok, so now I have this:

    <p class=”mbn” style=”line-height:1.6em;”>MIND-BODY CONNECTION . RECIPES . CELIAC . FOOD SENSITIVITY . JUNK FOOD . WOMEN’S HEALTH . DRUGS . MEDICAL-INDUSTRIAL COMPLEX . SUGAR . DIABETES . FUNCTIONAL MEDICINE . BOOKS . USEFUL THINGS .</p>
    </div>

    Should I change it to this:

    <p class=”mbn” style=”line-height:1.6em;”>$categories = get_categories( array(
    ‘orderby’ => ‘name’,
    ‘parent’ => 0
    ) );

    foreach ( $categories as $category ) {
    printf( ‘%2$s<br />’,
    esc_url( get_category_link( $category->term_id ) ),
    esc_html( $category->name )
    );
    }</p>
    </div>

    #1248674
    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1248701
    sandra.i
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-1246933 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>