WordPress.org

Ready to get started?Download WordPress

Forums

inlcuding a function file in new theme process (9 posts)

  1. emaarkhan
    Member
    Posted 1 year ago #

    hi,
    i am making a theme in which i want to include function.php. i tried include but it didn't work. how does WP adds its functions file.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    You just need to have a functions.php file in your theme folder.

  3. emaarkhan
    Member
    Posted 1 year ago #

    yes i have. wht makes me wonder is that it is writing down the menus in functions.php but don't enqueque jquery, i did it same way as told in codex but it doesn't show in source.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    WordPress enqueues jQuery by default. Why would you need to re-enqueue it?

  5. emaarkhan
    Member
    Posted 1 year ago #

    maybe for themes that's available. i am creating custom theme.i have this everything ready in html n running for months bt now i m moving it to WP.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Since jQuery is already loaded, you don't have to enqueue it in a theme.

  7. emaarkhan
    Member
    Posted 1 year ago #

    I tried to use alert. not working, so i am guessing its not enqueue

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    jQuery is already loaded. There mist be something wrong with your javascript. Have you tried reviewing Using_Javascript?

  9. emaarkhan
    Member
    Posted 1 year ago #

    here is my code

    jQuery(document).ready(function(){
        jQuery("#galleryhdr").fwShowcase({"galleryTxtColor": "#666666","padding": 0,"borderWidth": 0,"prevTxt": "Prev","nextTxt": "Next","playTxt": "Play/Pause","closeTxt": "Close","duration": 8,"max": 1024,"slideshow": true,"controls": true,"showInfo": true,"autohideControls": false,"autohideInfo": false,"align": 1,"controlsPath": "resources/controls.png","imageCss": {},"galleryCss": {},"thumbs":false});
    	});

    even when i do simple alert. the page is loaded but its blank. i checked the source. its empty :(

Topic Closed

This topic has been closed to new replies.

About this Topic