• Resolved livelaughplay

    (@livelaughplay)


    I’ve read other forum posts on this and read the Codex here https://codex.www.ads-software.com/Template_Tags/wp_list_categories but when I paste the code from that page after the <?php (or whatever that tag is) something weird happens. When I load the page the categories show up on the left side in a vertical list then disappear. I currently don’t have categories showing since my template didn’t come with them, I just want to put them at the top with the nav bar.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you’re having a CSS issue then you need to link the page with the issue

    Thread Starter livelaughplay

    (@livelaughplay)

    Ugh I’m usually so good about including it! https://www.livelaughandplay.com

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is it the Home page that the categories are supposed to show up on the left-hand side briefly before disappearing?

    Thread Starter livelaughplay

    (@livelaughplay)

    No the current nav bar stays where it is but the categories I have set up show up on the left then go away quickly after. Do you need me to re-apply the code I used?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes please

    Thread Starter livelaughplay

    (@livelaughplay)

    I got it back up now.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    This is the HTML of your categories, it is not valid HTML:

    <li class="categories">Categories<ul>	<li class="cat-item cat-item-10"><a href="https://www.livelaughandplay.com/category/blog-resources/">Blog Resources</a>
    </li>
    	<li class="cat-item cat-item-3"><a href="https://www.livelaughandplay.com/category/challenges/">Challenges</a>
    </li>
    	<li class="cat-item cat-item-7"><a href="https://www.livelaughandplay.com/category/craftingart/">Crafting & Art</a>
    <ul class="children">
    	<li class="cat-item cat-item-186"><a href="https://www.livelaughandplay.com/category/craftingart/painting/">Painting</a>
    </li>
    </ul>
    </li>
    	<li class="cat-item cat-item-4"><a href="https://www.livelaughandplay.com/category/diy/">DIY Do It Yourself</a>
    </li>
    	<li class="cat-item cat-item-5"><a href="https://www.livelaughandplay.com/category/recipes/">Easy Recipes</a>
    <ul class="children">
    	<li class="cat-item cat-item-182"><a href="https://www.livelaughandplay.com/category/recipes/desserts/">Desserts</a>
    </li>
    	<li class="cat-item cat-item-183"><a href="https://www.livelaughandplay.com/category/recipes/dinners/">Dinners</a>
    </li>
    </ul>
    </li>
    	<li class="cat-item cat-item-9"><a href="https://www.livelaughandplay.com/category/freebies/">Freebies</a>
    </li>
    	<li class="cat-item cat-item-6"><a href="https://www.livelaughandplay.com/category/tutorials/">How To's and Tutorials</a>
    <ul class="children">
    	<li class="cat-item cat-item-174"><a href="https://www.livelaughandplay.com/category/tutorials/helpful-tips/">Helpful Tips</a>
    </li>
    </ul>
    </li>
    	<li class="cat-item cat-item-16"><a href="https://www.livelaughandplay.com/category/organize/">Organize</a>
    </li>
    	<li class="cat-item cat-item-35"><a href="https://www.livelaughandplay.com/category/totally-random/">Totally Random</a>
    <ul class="children">
    	<li class="cat-item cat-item-184"><a href="https://www.livelaughandplay.com/category/totally-random/editorials/">Editorials</a>
    </li>
    </ul>
    </li>
    </ul></li>

    And you are inserting it before the Doctype view-source:https://www.livelaughandplay.com/

    Thread Starter livelaughplay

    (@livelaughplay)

    I don’t have an html file to work with, actually. They’re all PHP :/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, but the way your website works is it generates HTML. Which theme are you using?

    Thread Starter livelaughplay

    (@livelaughplay)

    I’m using Radiate. I know it generates HTML but I don’t know how to edit the files to affect the HTML other than with CSS. I don’t understand PHP enough, unfortunately. Could those categories’ HTML be a result of the code I pasted into my header.php file? I did it via instructions from Codex (link in opening post).

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How many edits have you done by now? These changes should be made in a Child Theme: https://codex.www.ads-software.com/Child_Themes

    Then post on your theme’s support section here if you’re not sure how to modify something within a child theme: https://www.ads-software.com/support/theme/radiate#postform

    Thread Starter livelaughplay

    (@livelaughplay)

    All my edits are on the child theme, I haven’t done anything to the parent. I haven’t made any other changes.

    Thread Starter livelaughplay

    (@livelaughplay)

    I looked at the support page before but didn’t find a solution, and I hesitate to post on theme-specific pages since I never get any help on them.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Could those categories’ HTML be a result of the code I pasted into my header.php file

    Yes.

    <ul>
    <?php wp_list_categories('orderby=id&show_count=1&use_desc_for_title=0&child_of=8'); ?>
    </ul>

    That’s exactly the sort of thing that would output what you’re seeing. It’s because you didn’t put it in the right place in your header.php.

    I would remove it for now and then explain what you want to put and where. Don’t worry about the code part just yet ?? Explain in plain ol’ English like “I want to show my categories along a bar on the top of my site.” ??

    Thread Starter livelaughplay

    (@livelaughplay)

    I was looking around and I found that I can’t even add more than 3 things to the top menu bar…I have to buy the pro version. Looks like I’m changing themes yet again…Thanks for everyone’s help!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Trouble moving categories to nav bar’ is closed to new replies.