mag

Member

Forum Replies Created

  • In reply to: Remove Post from Static Front Page

    #37595

    Like what you’ve done with the graphene theme, Julie.

    In reply to: Struggling with custom javascript queue in functions.php

    #37621

    I figured this out.

    I don’t know why it wasn’t working previously but I tried again and added another line after the first with the second script listed…

    wp_enqueue_script( 'acac1', get_stylesheet_directory_uri() . '/acac1.js', array(), false );
    wp_enqueue_script( 'newscript', get_stylesheet_directory_uri() . '/newscript.js', array(), false );

    It is working now. I hope it is correctly formatted. It must have been a typo.

    In reply to: Remove Post from Static Front Page

    #37592

    You can change what is shown on the home page in the general wordpress settings under reading and in the graphene options under the “general” tab.

    The slider bars can be removed by using this code in the custom css section in graphene settings.

    .featured_slider {
    background: none;
    }

    In reply to: Remove page title from slider text?

    #37590

    I’m not sure if this is what you want but I’ve successfully removed a slider title using this in the custom CSS section

    .slider_post h2 {
    display: none;
    }

    In reply to: javascript – where to add in loop-page.php?

    #37502

    So sorry but I have another question.

    The new idea is to have more sliders on different pages.

    I added another script etc. and tried to add it to the functions.php but I am getting the error again. The first script listed is still working fine.

    I tired to add another en-queue line directly under the first one.

    I searched documentation using snippets of code and there are various examples and it seemed to be that I was doing it correctly but I must not be resolving things correctly – bad punctuation somewhere.

    Any advice will be greatly appreciated.

    In reply to: javascript – where to add in loop-page.php?

    #37501

    You are a genius! Thank YOU!

    The change in the functions.php initially broke the front page accordion too.

    and then it was also reporting the error that was on the other page.

    ReferenceError: ac1init_doc is not defined

    So I went back into the wizard that builds the script/html.

    Instead of using the option of “no folder’ I defined a folder and uploaded the entire folder to the child theme root and used the generated html IE:

    <script src="FOLDERLOCATION/acac1.js" type="text/javascript"></script><script>ac1init_doc('FOLDERLOCATION',0);</script>

    Then I revised the paths in the functions.php and the widget. It works perfectly and isn’t choking on load.

    Here is a link… it might not be there very long since I will probably delete after matching her current site.

    Wanted to get the accordion out of the way.

    http://ourfamilysrecipes.com/pic

    Here is her original site using the sliding door theme.

    http://paulainchina.com

    Personally, I’d like to see the images linking to something.- she doesn’t want that. Maybe a lightbox might be nice.

    THANK YOU AGAIN!

    I am amazed at how versatile this theme is. I wish I had more coding knowledge to take advantage of everything it has to offer.

    I have another question related to templates – I’ll make a new thread.

    In reply to: javascript – where to add in loop-page.php?

    #37499

    Right now it is in the graphene-child folder. I have tried it in nearly every folder along with the images. It works when in the site root and when in the theme root. and even works in other locations if I add the path and make sure the images are in the same folder. But no matter where I place it , it only works on the home page. The other pages show an error. I’ve googled the error and the script – no help.

    ReferenceError: ac1init_doc is not defined

    In reply to: javascript – where to add in loop-page.php?

    #37497

    This what I found that I think might be relevant:

    add_action('init', 'register_my_script');
    add_action('wp_footer', 'print_my_script');

    function register_my_script() {
    wp_register_script('my-script', plugins_url('my-script.js', __FILE__), array('jquery'), '1.0', true);
    }

    function print_my_script() {
    global $add_my_script;

    if ( ! $add_my_script )
    return;

    wp_print_scripts('my-script');
    }

    reference:http://scribu.net/wordpress/optimal-script-loading.html

    In reply to: javascript – where to add in loop-page.php?

    #37496

    Oh my gosh, you are so nice to reply. Thank you! I’ve been reading a lot tonight about the loading queue and registration of scripts but it is definitely over my head. I know enough about php to be dangerous.

    The html file that is generated by the wizard simply has the following code in it.

    <script src="acac1.js" type="text/javascript"></script><script>ac1init_doc('',0);</script>

    I’ve been trying to use it in the following Action hook widget areas:

    graphene_before_content

    graphene_before_content-main

    The accordion slider shows on the front page which is a static page but no where else. The other pages load very slowly like they are trying to load the script … The area before the widget firs then a delay and the area below… but no widget shows.

    The widget used to insert the html code is called Enhanced Text and is supposed to support scripts etc.

    I also have a widget installed to insert php.

    Thanks again for answering my post.

Viewing 9 posts - 11 through 19 (of 19 total)

  • 1
  • 2