Jump to content

kwmlr439

Members
  • Posts

    14
  • Joined

  • Last visited

kwmlr439's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Clarkey,Thanks for your reply; I just tried to add add the if statement before the functions but didn't work; it just went blank
  2. PHP Warriors, Please help I am trying to write a function in the genesis framwork that would allow me to add before_content_sidebar_wrap only on page_blog.php for my slider but can't seem to get it to work! I notice that the wrap and hook are added successefully but they display in every page instead of the blog only. Any help would be greatly appreciated. Here is my function add_action('genesis_before_content_sidebar_wrap', 'child_before_content_sidebar_wrap'); if ( ! ( is_page_template( ‚page_blog.php‚ ) ) ) return; and here is my website I am displaying the slider on. It should be only on the blog page; mainlinerealtors.com/blog/ Thanks a lot,
  3. I did not know which section I should publish this topic but I assumed it is PHP related. Any ideas from inspecting the code what kind of plugins this site is using to display the category posts as a gallery at the top? http://www.zillow.com/blog/ Any help would be greatly appreciated, Thanks,
  4. I was wondering if there is a way to switch the display of woocommerce hooks on my single product page shop. I would like to remove: add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); and replace that with my product description. Here is my Woocommerce-hooks.php file. Any help would be greatly appreciated. <?php /** * WooCommerce Hooks * * Action/filter hooks used for WooCommerce functions/templates * * @author WooThemes * @category Core * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** Template Hooks ********************************************************/ if ( ! is_admin() || defined('DOING_AJAX') ) { /** * Content Wrappers * * @see woocommerce_output_content_wrapper() * @see woocommerce_output_content_wrapper_end() */ add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); /** * Sale flashes * * @see woocommerce_show_product_loop_sale_flash() * @see woocommerce_show_product_sale_flash() */ add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); /** * Breadcrumbs * * @see woocommerce_breadcrumb() */ add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); /** * Sidebar * * @see woocommerce_get_sidebar() */ add_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); /** * Archive descriptions * * @see woocommerce_taxonomy_archive_description() * @see woocommerce_product_archive_description() */ add_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 ); /** * Products Loop * * @see woocommerce_show_messages() * @see woocommerce_result_count() * @see woocommerce_catalog_ordering() */ add_action( 'woocommerce_before_shop_loop', 'woocommerce_show_messages', 10 ); add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); /** * Product Loop Items * * @see woocommerce_show_messages() * @see woocommerce_template_loop_add_to_cart() * @see woocommerce_template_loop_product_thumbnail() * @see woocommerce_template_loop_price() * @see woocommerce_template_loop_rating() */ add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); /** * Subcategories * * @see woocommerce_subcategory_thumbnail() */ add_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10 ); /** * Before Single Products * * @see woocommerce_show_messages() */ add_action( 'woocommerce_before_single_product', 'woocommerce_show_messages', 10 ); /** * Before Single Products Summary Div * * @see woocommerce_show_product_images() * @see woocommerce_show_product_thumbnails() */ add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); /** * After Single Products Summary Div * * @see woocommerce_output_product_data_tabs() * @see woocommerce_upsell_display() * @see woocommerce_output_related_products() */ add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); /** * Product Summary Box * * @see woocommerce_template_single_title() * @see woocommerce_template_single_price() * @see woocommerce_template_single_excerpt() * @see woocommerce_template_single_meta() * @see woocommerce_template_single_sharing() */ add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 ); /** * Product Add to cart * * @see woocommerce_template_single_add_to_cart() * @see woocommerce_simple_add_to_cart() * @see woocommerce_grouped_add_to_cart() * @see woocommerce_variable_add_to_cart() * @see woocommerce_external_add_to_cart() */ add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 ); add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 ); add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 ); add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 ); /** * Pagination after shop loops * * @see woocommerce_pagination() */ add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); /** * Product page tabs */ add_filter( 'woocommerce_product_tabs', 'woocommerce_default_product_tabs' ); add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 ); /** * Checkout * * @see woocommerce_checkout_login_form() * @see woocommerce_checkout_coupon_form() * @see woocommerce_order_review() */ add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 ); add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 ); /** * Cart * * @see woocommerce_cross_sell_display() */ add_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' ); /** * Footer * * @see woocommerce_demo_store() */ add_action( 'wp_footer', 'woocommerce_demo_store' ); /** * Order details * * @see woocommerce_order_details_table() * @see woocommerce_order_details_table() */ add_action( 'woocommerce_view_order', 'woocommerce_order_details_table', 10 ); add_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 ); } /** Store Event Hooks *****************************************************/ /** * Shop Page Handling and Support * * @see woocommerce_template_redirect() * @see woocommerce_nav_menu_item_classes() * @see woocommerce_list_pages() */ add_action( 'template_redirect', 'woocommerce_template_redirect' ); add_filter( 'wp_nav_menu_objects', 'woocommerce_nav_menu_item_classes', 2, 20 ); add_filter( 'wp_list_pages', 'woocommerce_list_pages' ); /** * Logout link * * @see woocommerce_nav_menu_items() */ add_filter( 'wp_nav_menu_objects', 'woocommerce_nav_menu_items', 10, 2 ); /** * Clear the cart * * @see woocommerce_empty_cart() * @see woocommerce_clear_cart_after_payment() */ if ( get_option( 'woocommerce_clear_cart_on_logout' ) == 'yes' ) add_action( 'wp_logout', 'woocommerce_empty_cart' ); add_action( 'get_header', 'woocommerce_clear_cart_after_payment' ); /** * Disable admin bar * * @see woocommerce_disable_admin_bar() */ add_filter( 'show_admin_bar', 'woocommerce_disable_admin_bar', 10, 1 ); /** * Cart Actions * * @see woocommerce_update_cart_action() * @see woocommerce_add_to_cart_action() * @see woocommerce_load_persistent_cart() */ add_action( 'init', 'woocommerce_update_cart_action' ); add_action( 'init', 'woocommerce_add_to_cart_action' ); add_action( 'wp_login', 'woocommerce_load_persistent_cart', 1, 2 ); /** * Checkout Actions * * @see woocommerce_checkout_action() * @see woocommerce_pay_action() */ add_action( 'init', 'woocommerce_checkout_action', 20 ); add_action( 'init', 'woocommerce_pay_action', 20 ); /** * Login and Registration * * @see woocommerce_process_login() * @see woocommerce_process_registration() */ add_action( 'init', 'woocommerce_process_login' ); add_action( 'init', 'woocommerce_process_registration' ); /** * Product Downloads * * @see woocommerce_download_product() */ add_action('init', 'woocommerce_download_product'); /** * Analytics * * @see woocommerce_ecommerce_tracking_piwik() */ add_action( 'woocommerce_thankyou', 'woocommerce_ecommerce_tracking_piwik' ); /** * RSS Feeds * * @see woocommerce_products_rss_feed() */ add_action( 'wp_head', 'woocommerce_products_rss_feed' ); /** * Order actions * * @see woocommerce_cancel_order() * @see woocommerce_order_again() */ add_action( 'init', 'woocommerce_cancel_order' ); add_action( 'init', 'woocommerce_order_again' ); /** * Star Ratings * * @see woocommerce_add_comment_rating() * @see woocommerce_check_comment_rating() */ add_action( 'comment_post', 'woocommerce_add_comment_rating', 1 ); add_filter( 'preprocess_comment', 'woocommerce_check_comment_rating', 0 ); /** * Filters */ add_filter( 'woocommerce_short_description', 'wptexturize' ); add_filter( 'woocommerce_short_description', 'convert_smilies' ); add_filter( 'woocommerce_short_description', 'convert_chars' ); add_filter( 'woocommerce_short_description', 'wpautop' ); add_filter( 'woocommerce_short_description', 'shortcode_unautop' ); add_filter( 'woocommerce_short_description', 'prepend_attachment' ); add_filter( 'woocommerce_short_description', 'do_shortcode', 11 ); // AFTER wpautop() woocommerce-hooks.php
  5. Thanks for your help, Here is what I have so far. I haven't made any changes yet except for the first few lines. Thanks a lot guys for your help. It is greatky appreciated: -- phpMyAdmin SQL Dump -- version 3.4.11.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 01, 2013 at 10:59 PM -- Server version: 5.5.34 -- PHP Version: 5.2.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `mydtabasename` -- -- -------------------------------------------------------- -- -- Table structure for table `listings` -- DROP TABLE IF EXISTS `listings`; CREATE TABLE IF NOT EXISTS `listings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `address` varchar(64) NOT NULL, `city` varchar(64) NOT NULL, `state` char(2) NOT NULL, `zipcode` int(5) NOT NULL, `bedrooms` varchar(2) NOT NULL, `sqft` varchar( NOT NULL, `type` varchar(64) NOT NULL, `status` varchar(64) NOT NULL, `price` varchar( NOT NULL, `mlsnumber` varchar( NOT NULL, `mlsarea` varchar(64) NOT NULL, `county` varchar(64) NOT NULL, `taxid` varchar(64) NOT NULL, `subdivnei` varchar(64) NOT NULL, `schooldistrict` varchar(64) NOT NULL, `elementaryschool` varchar(64) NOT NULL, `middleschool` varchar(64) NOT NULL, `highschool` varchar(64) NOT NULL, `beds` varchar(64) NOT NULL, `baths` varchar(64) NOT NULL, `propertytype` varchar(64) NOT NULL, `condohoa` varchar(64) NOT NULL, `recurfeefreq` varchar(64) NOT NULL, `age` varchar(64) NOT NULL, `unitfloornumber` varchar(64) NOT NULL, `waterfront` varchar(64) NOT NULL, `intsqft` varchar(64) NOT NULL, `propertydescription` varchar(64) NOT NULL, `lrgr` varchar(64) NOT NULL, `dinning` varchar(64) NOT NULL, `kitchen` varchar(64) NOT NULL, `family` varchar(64) NOT NULL, `inclusions` varchar(64) NOT NULL, `exclusions` varchar(64) NOT NULL, `mainbr` varchar(64) NOT NULL, `secondbr` varchar(64) NOT NULL, `thirdbr` varchar(64) NOT NULL, `fourthbr` varchar(64) NOT NULL, `totalrooms` varchar(64) NOT NULL, `totalbaths` varchar(64) NOT NULL, `uperfloors` varchar(64) NOT NULL, `mainfloors` varchar(64) NOT NULL, `lowerfloors` varchar(64) NOT NULL, `applyat` varchar(64) NOT NULL, `availdate` varchar(64) NOT NULL, `applicationfee` varchar(64) NOT NULL, `securitydeposit` varchar(64) NOT NULL, `minterm` varchar(64) NOT NULL, `maxterm` varchar(64) NOT NULL, `acreslsf` varchar(64) NOT NULL, `approxdim` varchar(64) NOT NULL, `otherschools` varchar(64) NOT NULL, `style` varchar(64) NOT NULL, `stories` varchar(64) NOT NULL, `parkingspace` varchar(64) NOT NULL, `taxrate` varchar(64) NOT NULL, `basement` varchar(64) NOT NULL, `construction` varchar(64) NOT NULL, `fireplace` varchar(64) NOT NULL, `builtin` varchar(64) NOT NULL, `heating` varchar(64) NOT NULL, `exteriorwalls` varchar(64) NOT NULL, `parking` varchar(64) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  6. Yes MYSQL tables but I can't move this topic to a different section can I? John
  7. Guru, I apologies! I actually started doing what Ch0cu3r suggested and I am creating all the tables I need right now using the advices here and reading the URL I was provided. But some of the fields are complex and I don't think I will be able to figure them out. That's why I said that I could create all the tables which will speed up the process than figure out a way to make appropriate change or find someone to help me. My intentions to this forum are harmless and I'm indeed looking forward to your answers and learn more about PHP tables. Regards, John
  8. I think I may create all the tables I need using the same format and structure and pay someone to change the value of each one of them. I have a bigger problem than I thought but I love to learn actually! It's a fascianting experience for me. John
  9. kwmlr439

    New to PHP

    I have created some tables on phpmyadmin but not sure if I did it right regarding varchar and the 255 value. If anyone is familiar with this and can correct it that would be great. Thanks. Here are the tables: http://oi44.tinypic.com/1z6v2j5.jpg
  10. I did solve this thank you: //marketing materials for buyers wordpress menu add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( "For Buyers", "For Buyers", "manage_options", "for_buyers", "add_buyers_function" ); add_submenu_page( "for_buyers", "", "", "manage_options", "for_buyers","add_buyers_function"); add_submenu_page( "for_buyers", "Marketing Materials", "Marketing Materials", "manage_options", "marketing_materials","add_marketing_materials"); add_submenu_page( "for_buyers", "First Time Buyers", "First Time Buyers", "manage_options", "first_time_buyers","add_first_time_buyers"); add_submenu_page( "for_buyers", "Lead Generation", "Lead Generation", "manage_options", "lead_generation","add_lead_generation"); add_submenu_page( "for_buyers", "Ad Campaign", "Ad Campaign", "manage_options", "ad_campaign","add_ad_campaign"); } function add_buyers_function(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //buyers wordpress menu function add_marketing_materials(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //first time buyers wordpress sub menu function add_first_time_buyers(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //lead generation wordpress sub menu function add_lead_generation(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //ad campaign wordpress sub menu function add_ad_campaign(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php }
  11. I have worked so hard to create a WordPress function and I got stuck. I am pretty sure that for some of you it will take 2 second to figure it out. I am familiar with WordPress and I know my way around it but i lack coding skills. Please help me correct this function keeping in mind that I want my banner and logo included and that's what the: <div class="wrap"> and <div class="icon32" id="icon-index"><br></div> is all about. What I am trying to do is the followings: Have a Main menu item in WordPress Dashboard for both Admins and Subscribers to be displayed with the main Menu titled: "For Buyers" then add submenus with the following titles: Marketing Materials - First Time Buyers - Lead Generation - Ad campaigns. Thank you so much, this is a wonderful community . add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( "For Buyers", "For Buyers", "manage_options", "for_buyers", "add_buyers_function", '', 61 ); add_submenu_page( "for_buyers", " Marketing Materials", " Marketing Materials", "manage_options", "marketing_materials","add_marketing_materials"); } function add_buyers_function(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //marketing materials for buyers wordpress menu function add_marketing_materials(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php }
  12. Hello: Any PHP MYSQL experts out there willing to help? I would greatly appreciate it. I built a web directory using WordPress Platform and I am trying to PULL data from my database and display it on the home page. I have the following code: $sql = "SELECT * FROM `agents` LIMIT 0, 30 "; I know this isn't much to work with but I am happy to answer any question related to my tables. Regards, John.
  13. Gurus, My question is that i need help on how to build the tables and the php code. Here is my HTML Form: <form role="search" method="post" id="searchform" action="#" > <input type="hidden" value="" name="s" /> <input type="hidden" value="listing" name="post_type" /> <select name='State' id='State' class='state'> <option value="Select a State" selected>Select a State</option> </select><select name='county' id='county' class='county'> <option value="Select a County">Select a County</option> </select><select name='city' id='city' class='city'> <option value="Select a City">Select a City</option> </select> <select name='company' id='company' class='company'> <option value="Select a Company">Select a Company</option> </select><select name='agent type' id='agent type' class='agent type'> <option value="Agents Type">Agents Type</option> </select> <input type="submit" id="searchsubmit" class="searchsubmit" value="Search Real Estate Agents" /> </form>
  14. I have a website that runs on WordPress / PHP & MYSQL Database. I was hoping to build a search form that will access my database and grab result to display in a separate page. Any help would be greatly appreciated. Thank you!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.