Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Add content to home page above Categories directory

  1. #11
    Thread Starter
    maryclove's Avatar
    Join Date
    Jan 2011
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post
    Version 3.1.9
    (I think that's the latest?)
    I'm using a child theme.

    I also played around with putting the Categories code in a separate content box, but the same thing happens--2 columns.

    Wonder what would happen if I said 4 . . . ?!

  2. #12
    Marketplace Seller mohsinoffline's Avatar
    Join Date
    Dec 2011
    Location
    Algeria
    Posts
    1,575
    Thanks
    44
    Thanked 213 Times in 192 Posts
    OK, just change

    PHP Code:
    <div id="directory" class="directory threeCol<?php if(get_option('cp_cat_dir_cols') == 3) echo 'three'?>Col">
    with

    PHP Code:
    <div id="directory" class="directory threeCol"
    Let's hope that works
    Do you need content that helps to rank your website better on Google? Check out https://aicontently.com

    Create a website like Retailmenot with FlatterPro Theme , Check out the demo here Retailmenot





  3. The Following User Says Thank You to mohsinoffline For This Useful Post:

    maryclove (May 30th, 2012)

  4. #13
    Thread Starter
    maryclove's Avatar
    Join Date
    Jan 2011
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post
    Well, it didn't work either!

    I'll post my entire code for the item--in case there's something in there that's blocking the command.

    PHP Code:
    <div class="shadowblock_out">
        
                        <div class="shadowblock">
                     
                     <h2 align="center"><font color="#336699">Find local pet resources in our Directory</font></h2>

    <center><p>Click on the <b>Categories</b> tab above to access the directory from any page on this site.</p></center>
                            <div id="directory" class="directory threeCol"> 


                                <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols'), get_option('cp_dir_sub_num')); ?>


                                <div class="clr"></div>

                            </div><!--/directory-->

        
                        </div><!-- /shadowblock -->
        
                    </div><!-- /shadowblock_out -->

    I really do appreciate your time and help with this.
    I can actually live with the two columns--but now it's become like a puzzle to solve!

  5. #14
    Marketplace Seller mohsinoffline's Avatar
    Join Date
    Dec 2011
    Location
    Algeria
    Posts
    1,575
    Thanks
    44
    Thanked 213 Times in 192 Posts
    ok, one major thing is to replace the old category function with the new one. Basically this is why I asked which version you're using:

    [LEFT]
    PHP Code:
     <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols'), get_option('cp_dir_sub_num')); ?>
    [/LEFT]

    this should go now as this function is deprecated and should be replaced by:

    PHP Code:
    <?php echo cp_create_categories_list'dir' ); ?>
    Hopefully the puzzle is solved.
    Do you need content that helps to rank your website better on Google? Check out https://aicontently.com

    Create a website like Retailmenot with FlatterPro Theme , Check out the demo here Retailmenot





  6. #15
    Thread Starter
    maryclove's Avatar
    Join Date
    Jan 2011
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post
    Well, it still refuses to cooperate!

    Maybe this has something to do with my child theme being created before updating to the latest ClassiPress?

    Here is where I inserted the Q2W3 codes on my index.php:

    PHP Code:
    <?php get_header(); ?>

    <div class="content">

        <div class="content_botbg">

            <div class="content_res">

                <?php 
                    
    if ( file_exists(STYLESHEETPATH '/featured.php') )
                        include_once(
    STYLESHEETPATH '/featured.php');
                    else
                        include_once(
    TEMPLATEPATH '/featured.php');
                
    ?>


            <!-- left block -->
            <div class="content_left">

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(1); ?>

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(2); ?>

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(3); ?>

                <?php if ( get_option('cp_home_layout') == 'directory' ) : ?>

                    <div class="shadowblock_out">

                        <div class="shadowblock">

                            <h2 class="dotted"><?php _e('Categories','appthemes')?></h2>

                            <div id="directory" class="directory threeCol<?php if(get_option('cp_cat_dir_cols') == 3) echo 'three'?>Col">


                                <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols'), get_option('cp_dir_sub_num')); ?>


                                <div class="clr"></div>

                            </div><!--/directory-->
    Maybe I'll take a PHP course someday . . . (!)

  7. #16
    Marketplace Seller mohsinoffline's Avatar
    Join Date
    Dec 2011
    Location
    Algeria
    Posts
    1,575
    Thanks
    44
    Thanked 213 Times in 192 Posts
    May be you didn't get my last message?

    Replace all that you pasted above with exactly this

    PHP Code:
    <?php get_header(); ?> 

    <div class="content"> 

        <div class="content_botbg"> 

            <div class="content_res"> 

                <?php  
                    
    if ( file_exists(STYLESHEETPATH '/featured.php') ) 
                        include_once(
    STYLESHEETPATH '/featured.php'); 
                    else 
                        include_once(
    TEMPLATEPATH '/featured.php'); 
                
    ?> 


            <!-- left block --> 
            <div class="content_left"> 

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(1); ?> 

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(2); ?> 

    <?php if ( method_exists('q2w3_inc_manager''manual_inc') ) q2w3_inc_manager::manual_inc(3); ?> 

                <?php if ( get_option('cp_home_layout') == 'directory' ) : ?> 

                    <div class="shadowblock_out"> 

                        <div class="shadowblock"> 

                            <h2 class="dotted"><?php _e('Categories','appthemes')?></h2> 

                            <div id="directory" class="directory threeCol">
                                <?php echo cp_create_categories_list'dir' ); ?>

                                <div class="clr"></div>
                            </div><!--/directory-->
    Don't think it's anything to do with the code you inserted above the categories
    Do you need content that helps to rank your website better on Google? Check out https://aicontently.com

    Create a website like Retailmenot with FlatterPro Theme , Check out the demo here Retailmenot





  8. #17
    Thread Starter
    maryclove's Avatar
    Join Date
    Jan 2011
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post
    Well, I did that too, and it refused again to work.

    So I put the code back the way it was (so that I wouldn't upset the person too much who made my child theme).

    Anyhow, I told it to put it all in two columns, and that actually looks pretty good now--now that they're evenly distributed and not scrunched along the left. I'm happy enough!

    Again, I do appreciate the time you took to advise me. I learned a thing or two about code in the process, so I understand things a little better.

    Thanks again!

  9. #18
    Marketplace Seller mohsinoffline's Avatar
    Join Date
    Dec 2011
    Location
    Algeria
    Posts
    1,575
    Thanks
    44
    Thanked 213 Times in 192 Posts
    OK, anyway, just want to point out that the function I mentioned in #14 is now deprecated, and should be replaced in all child themes for them to work in the future versions.

    All the best!!
    Mohsin
    Do you need content that helps to rank your website better on Google? Check out https://aicontently.com

    Create a website like Retailmenot with FlatterPro Theme , Check out the demo here Retailmenot





  10. The Following User Says Thank You to mohsinoffline For This Useful Post:

    maryclove (May 31st, 2012)

  11. #19
    Member nicholasdhilton's Avatar
    Join Date
    Mar 2012
    Location
    United States
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm def. going to try this on my page.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to display onlu sub categories on home page directory list ?
    By anilkumarkanneboina in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: May 7th, 2012, 01:39 PM
  2. how to list Category on a new page, just like the directory style on home page?
    By dxf9001 in forum ClassiPress General Discussion
    Replies: 2
    Last Post: June 4th, 2011, 09:36 AM
  3. Unable to locate WordPress Content directory (wp-content).
    By anutka in forum WordPress General Discussion
    Replies: 2
    Last Post: February 15th, 2011, 10:35 AM
  4. Add content to home page
    By frankbuddenbrock in forum ClassiPress General Discussion
    Replies: 1
    Last Post: July 26th, 2010, 03:27 AM