WordPress.org

Ready to get started?Download WordPress

Forums

Pages and Categories (8 posts)

  1. FatMatt
    Member
    Posted 4 years ago #

    Hello,Can i switch between my Categories and pages?
    I want the categories to show up on the navigation bar instead of pages.. is it possible?
    My template is "interpidity"

    Thank you,FatMatt.

  2. It looks like your theme has the option to use category navigation. To enable it go to your footer.php file and find this line (It started at line 21 in my code editor):

    <?php /* Uncomment this if you want to show categories in the top navigation
    				<li><a rel="nofollow" href="#"><?php _e("Topics"); ?></a>
                        <ul><?php wp_list_categories('title_li=&depth=4&orderby=name'); ?></ul>
                    </li>*/?>
                  </ul>

    Change it to this:

    <?php
    				<li><a rel="nofollow" href="#"><?php _e("Topics"); ?></a>
                        <ul><?php wp_list_categories('title_li=&depth=4&orderby=name'); ?></ul>
                    </li> ?>
                  </ul>

    From a security standpoint I would be VERY concerned about this line of code found at the top of functions.php file:

    <?php
     function wp_list_addonn(){
     echo base64_decode("PGEgaHJlZj0iaHR0cDovL3NldG9ycmVudC5jb20vIj5vcmlnaW5zIHdvbHZlcmluZSB0b3Jy
    ZW50PC9hPgo8YSBocmVmPSJodHRwOi8vd3d3LnJveWFsLWF1dG8uaW5mby8iPm1lcmNlZGVz
    IGJlbnogc2xzIGFtZyB0dW5pbmcgY2FyPC9hPgo8YSBocmVmPSJodHRwOi8vYm9keWJ1aWxk
    aW5nLWZpdG5lc3MuYmxvZ3Nwb3QuY29tLyI+RGV4dGVyIEphY2tzb24gaGFzIHdvbiBvbiBj
    b21wZXRpdGlvbiBNciBPbHltcGlhPC9hPgo8YSBocmVmPSJodHRwOi8vbW9ydGdhZ2VjYWxj
    dWxhdG9yMnUuY29tLyI+bW9ydGdhZ2UgY2FsY3VsYXRvciB1azwvYT4KPGEgaHJlZj0iaHR0
    cDovL3RoZW1ld3AuY29tLyI+T3B0aW9uIG11bHRpbGFuZ3VhZ2Ugd29yZHByZXNzIHRlbXBs
    YXRlczwvYT4=");
     } ?>

    The only reason base64 code is used is to hide what the code really does. I don't have time to decode it but maybe someone else could help. Your version of this theme might not even contain the code. I just downloaded it from the first result I found in Google and also just realized it is a copy of the Intrepidity theme found in the WordPress theme repository.

    If you are using the copycat version I would delete it and install the real one. I would also change all my passwords and check to make sure your blog hasn't been compromised.

  3. I just decoded it and it contains a bunch of spam links. Not that dangerous but still not good.

  4. FatMatt
    Member
    Posted 4 years ago #

    i did what you sayed but it messed up my website,it just deleted the whole body of the website..
    i copied your code..
    My theme is translated to hebrew,but the code was exactly the same.

  5. I am so sorry. I made a mistake in the code and didn't remove the php tags that were wrapped around the commented out code.

    This is the correct change:

    <li><a rel="nofollow" href="#"><?php _e("Topics"); ?></a>
                        <ul><?php wp_list_categories('title_li=&depth=4&orderby=name'); ?></ul>
                    </li>
                  </ul>
  6. FatMatt
    Member
    Posted 4 years ago #

    Thanks,But now it shows a "Topics" on the navigation bar,and it has a Dropdown menu wich shows the categories..
    Is it possible to make it categories only,without the dropdown ?

  7. This might work for what you are trying to do.
    replace this code starting at line 11

    <div id="globalnav">
            	<div id="navpocket">
                  <ul id="nav"<?php echo (get_option('tbf1_search_header') == "no") ? ' class="nav-wide"' : '';?>>
    
                    <?php if(get_option('tbf1_nav_hide_home') != 'yes') : ?>
                    <li><a href="<?php echo get_option('home'); ?>" rel="nofollow"><?php _e('Home')?></a></li>
                    <?php endif; ?>
    
    				<?php wp_list_pages('title_li=&sort_column=menu_order&exclude='.get_option('tbf1_exclude_pages')); ?>
    
    				<li><a rel="nofollow" href="#"><?php _e("Topics"); ?></a>
                        <ul><?php wp_list_categories('title_li=&depth=4&orderby=name'); ?></ul>
                    </li>
                  </ul>

    To this:

    <div id="globalnav">
            	<div id="navpocket">
                  <ul id="nav" class="nav-wide">
    
                    <?php if(get_option('tbf1_nav_hide_home') != 'yes') : ?>
                    <li><a href="<?php echo get_option('home'); ?>" rel="nofollow"><?php _e('Home')?></a></li>
                    <?php endif; ?>
    
    				<?php wp_list_categories('title_li='); ?>
                  </ul>

    Also the theme author seems pretty helpful and answers a lot of questions specific to that theme here:
    http://wordpress.org/support/topic/382793/page/2?replies=37

  8. FatMatt
    Member
    Posted 4 years ago #

    Thank you sooo much! (:

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.