Jump to content

Search the Community

Showing results for tags 'wordpress'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 55 results

  1. I am developed a custom PHP page with filters, addto cart module, music playlist everything. How can i implement it into WordPress? I am a newbie, any help thanks. My custom PHP work directory structure : location : public_html/my_work website URL : website.com/my_work Everything working good, but my wordpress heaer and footer missing, thats what i am asking to how to implement my custom development multiple PHP page work into Wordpress.
  2. I wish to hire a php developer to design a imdb plugin that will slot into the way that I have designed my wordpress theme. Hope here from you soon Steven www.scottiescotsman.com
  3. I have coded a custom movie theme for wordpress but need a custom imdb plugin, as I am at present manually typing in all the movie data. I have tried most of the imdb plugins that are out there but to my dismay they don't hit the mark for me. I have also tried coding a plugin myself but I am dreadful as I know nothing about plugin development or scrapers or python, so I'm fked lol need loads of help but am also willing to pay for some ones services. Thanks in advance
  4. however, we are halfway into 2017 without hardly a peep about a Twenty Eighteen theme. well this makes me curious as to what is in store for us. I personally have not seen much of anything about it, so I have decided to ask here love to hear from you
  5. Hi, I am very very new to php and I'm building a Wordpress site using a theme so please bear with me if I ask any obvious questions. My site is running php 5.6 and Wordpress is up to date. In the theme options a php file called theme_options.php should give various items to place on the page but I am getting this error Warning: Invalid argument supplied for foreach() in on line 1114 /websites/123reg/LinuxPackage21/co/ok/es/cookesproperty.co.uk/public_html/dev/wp-content/themes/homely/admin/theme_options.php I have looked at line 1114 and this has this of code <?php $property_detail_items = get_option('rypecore_property_detail_items', $property_detail_items_default); $property_detail_items_order = get_option('rypecore_property_detail_items_order', $property_detail_items_order_default); foreach($property_detail_items_order as $value) { ?> The last line is line 1114 Is there anything obvious I am missing? Thanks for any help at all! Lisa
  6. What I am trying to do is extract the value of a variable from a hyperlink. The code that I have tried is as follows... #hyperlink creation <a href="<?php echo home_url(); ?>/title.php?title=<?php echo $args[$x]; ?>"><?php echo $args[$a]; ?></a> #value extract header(" echo home_url(); /" . $_GET ['title'] . ".php" ); $title = $_GET['title']; any help appreciated
  7. Hello Experts, I need help on a wordpress plugin "Easy Student Results". I installed this plugin for my ITI Institute results and when entered all institution trades, courses, students separated with trades and then started adding results on the basis of trades then this plugin doesn't show results of all trades students. It only shows results of firstly created trades students results. All other trades students results are showing unavailability error. So i need your help. https://wordpress.org/plugins/easy-student-results Thank you Manish Bajpai
  8. I have used this tutorial here (https://codex.wordpress.org/Integrating_WordPress_with_Your_Website) as a guide to set up non-wordpress pages to access some wordpress resources on non-wordpress pages. Eg I can view wordpress posts on non-wordpress page. I have wordpress installed in a sub-folder( ./root - PHP pages ./root/wordpres - Wordpress installation} In addition, I need to be able to detect if a user is logged into wordpress on the non-wordpress page. I am using this code below on non-wordpress pages for that: if(is_user_logged_in()){ $current_user = wp_get_current_user(); /** * @example Safe usage: $current_user = wp_get_current_user(); * if ( !($current_user instanceof WP_User) ) * return; */ echo 'Username: ' . $current_user->user_login . '<br />'; echo 'User email: ' . $current_user->user_email . '<br />'; echo 'User first name: ' . $current_user->user_firstname . '<br />'; echo 'User last name: ' . $current_user->user_lastname . '<br />'; echo 'User display name: ' . $current_user->display_name . '<br />'; echo 'User ID: ' . $current_user->ID . '<br />'; echo get_avatar( $current_user->user_email, 32 ). '<br />'; echo '<hr />'; } else{ echo 'Not logged-in'; } Even though I am logged into wordpress, when I navigate to the non-wordpress page, I see wordpress posts listed but, the is_user_logged_in() function returns false and prints 'Not logged-in'!!! Is there a way of achieving this besides the approach I have adopted? I need guidance to resolve this.
  9. Hi, I am having a small issue with a front end html form, which through a series of looped input fields will update multiple WordPress posts at once, on submisson. The issue i'm having currently, is on submission it's only updating 1 post. I have found a solution to my problem, here: http://wordpress.stackexchange.com/questions/206372/how-to-handle-dynamic-form-data-with-repeating-fields But as i am still a bit of a novice, I have tried to apply the max_id solution to my code below, so far i've not got it to work. Using the solution on the above link, I don't suppose someone could show/tell me, what the code should be in it's entirety?? Including the foreach section, thanks! foreach( $testArray as $value ) { $post_information = array( 'post_title' => $value, 'post_status' => 'publish', // Choose: publish, preview, future, draft, etc. 'post_type' => 'predictions' //'post',page' or use a custom post type if you want to ); //update post wp_update_post($post_information);
  10. Hello, I need a little help, I would greatly appreciate if someone helped me with this. I have 3 functions, and I want to make them work the following way: Function 1: This function gives me a list of users who liked a blog post. It gives me an HTML list. I want a formula which filters the output giving me ONLY the first value of the list. Or only the second value. Or only the third value. the_users_who_favorited_post($post_id = null, $site_id = null, $separator = 'list', $include_anonymous = true, $anonymous_label = 'Anonymous Users', $anonymous_label_single = 'Anonymous User'); Example of output: John Albert Mary I want to filter the list and obtain only the first value: John. Or obtain only the second: Albert Function 2: This function gives me the ID of the user. And I need to bring the value from the Function 1 and insert in this functon 2: <?php $user = get_userdatabylogin('value from function 1 here'); if($user){ echo $user->ID; } ?> The output from function 1 goes "value from function 1 here". And it will give me the ID. Function 3: This code will give me the user avatar, from the ID i obtain from function 2. <?php echo get_avatar( ID goes here , '100' ); ?> The output from function 2 goes "ID goes here". And it will give me the profile avatar picture. I need to join these formulas together, and make them work. Does anyone know how to do this? Thanks.
  11. I'm editing the Woocommerce e-mail files, and have got a session working. When it's echoed on the e-mail it appears as expected - "1 Day Health & Safety Awareness Chelmsford". However the if statement is not working. This is shown below, can anyone tell me where I'm going wrong? if (strpos($_SESSION['ahsname'], 'safety awareness') !== false) { // This is what I want to happen, the session should (and does) contain the string shown above //include( get_template_directory() . '/instructions/chelmsford-hsa-ahs.html'); echo "YES"; }else{ // This should not happen but it does! echo "NO "; echo $_SESSION['ahsname']; // the session is echoed with the bit I'm checking for included as mentioned above }
  12. I'm using WordPress and Tribe's Event Calendar and Event ticket plus plugins. Their website is http://theeventscalendar.co.uk. I've been using their forums but it's taking a while to sort this out, so though someone on here might be able to help. I've got an array that I need to echo out part of. Inside each key (0, 1, 2, 3 and so on) there are numerous parts like ["ID"], ["name"] and so on. I want to echo out the ["name"] part of the key. I have a var dump for 10 keys in the array, each of which have their own ["name"] set. In the situation I'm using it, it will always have just 1 in the array, so I can target the first key in the array. Any ideas please on how to echo the ["name"] part? I have left a var dump of the array below. array(10) { [0]=> object(Tribe__Tickets__Ticket_Object)#4474 (20) { ["ID"]=> int(405) ["name"]=> string(16) "2 day sssts kent" ["description"]=> string(0) "" ["price"]=> string(3) "295" ["regular_price"]=> string(3) "295" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(38) "http://ssstsuk.co.uk/2-day-sssts-kent/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-07-07 08:00:00" ["end_date"]=> string(19) "2016-07-30 17:00:00" ["purchase_limit"]=> string(1) "0" } [1]=> object(Tribe__Tickets__Ticket_Object)#4494 (20) { ["ID"]=> int(308) ["name"]=> string(22) "2 Day SSSTS Chelmsford" ["description"]=> string(0) "" ["price"]=> string(3) "265" ["regular_price"]=> string(3) "265" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(64) "http://ssstsuk.co.uk/1-day-health-safety-awareness-chelmsford-2/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(13) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-20 17:00:00" ["purchase_limit"]=> string(1) "0" } [2]=> object(Tribe__Tickets__Ticket_Object)#4687 (20) { ["ID"]=> int(306) ["name"]=> string(46) "1 Day Health & Safety Awareness Chelmsford" ["description"]=> string(0) "" ["price"]=> string(2) "95" ["regular_price"]=> string(2) "95" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(62) "http://ssstsuk.co.uk/1-day-health-safety-awareness-chelmsford/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-19 17:00:00" ["purchase_limit"]=> string(1) "0" } [3]=> object(Tribe__Tickets__Ticket_Object)#4662 (20) { ["ID"]=> int(304) ["name"]=> string(46) "1 Day Health & Safety Awareness Colchester" ["description"]=> string(0) "" ["price"]=> string(3) "150" ["regular_price"]=> string(3) "150" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(62) "http://ssstsuk.co.uk/1-day-health-safety-awareness-colchester/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-12 17:00:00" ["purchase_limit"]=> string(1) "0" } [4]=> object(Tribe__Tickets__Ticket_Object)#4475 (20) { ["ID"]=> int(301) ["name"]=> string(43) "1 Day Health & Safety Awareness Romford" ["description"]=> string(0) "" ["price"]=> string(3) "150" ["regular_price"]=> string(3) "150" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(51) "http://ssstsuk.co.uk/1-day-health-safety-awareness/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(1) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-12 17:00:00" ["purchase_limit"]=> string(1) "0" } [5]=> object(Tribe__Tickets__Ticket_Object)#4705 (20) { ["ID"]=> int(298) ["name"]=> string(19) "2 Day SSSTS Romford" ["description"]=> string(0) "" ["price"]=> string(3) "295" ["regular_price"]=> string(3) "295" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(33) "http://ssstsuk.co.uk/2-day-sssts/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(1) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 09:00:00" ["end_date"]=> string(19) "2016-07-10 17:00:00" ["purchase_limit"]=> string(1) "0" } [6]=> object(Tribe__Tickets__Ticket_Object)#4719 (20) { ["ID"]=> int(237) ["name"]=> string(10) "SSSTS Test" ["description"]=> string(0) "" ["price"]=> string(4) "9.99" ["regular_price"]=> string(4) "9.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(32) "http://ssstsuk.co.uk/sssts-test/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(6) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-08 08:00:00" ["end_date"]=> string(19) "2016-06-17 17:00:00" ["purchase_limit"]=> string(1) "0" } [7]=> object(Tribe__Tickets__Ticket_Object)#4803 (20) { ["ID"]=> int(110) ["name"]=> string(13) "IT Training 1" ["description"]=> string(34) "Admits one person to IT Training 1" ["price"]=> string(5) "10.99" ["regular_price"]=> string(5) "10.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(35) "http://ssstsuk.co.uk/it-training-1/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(2) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 09:00:00" ["end_date"]=> string(19) "2016-06-17 17:00:00" ["purchase_limit"]=> string(1) "0" } [8]=> object(Tribe__Tickets__Ticket_Object)#4894 (20) { ["ID"]=> int(108) ["name"]=> string(21) "Health & Safety 2" ["description"]=> string(40) "Admits one person to health and safety 2" ["price"]=> string(5) "11.99" ["regular_price"]=> string(5) "11.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(37) "http://ssstsuk.co.uk/health-safety-2/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(1) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 09:00:00" ["end_date"]=> string(19) "2016-07-22 17:00:00" ["purchase_limit"]=> string(1) "0" } [9]=> object(Tribe__Tickets__Ticket_Object)#4906 (20) { ["ID"]=> int(106) ["name"]=> string(28) "Health & Safety Course 1" ["description"]=> string(49) "Admits one person to Health & Safety Course 1" ["price"]=> string(5) "11.99" ["regular_price"]=> string(5) "11.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(44) "http://ssstsuk.co.uk/health-safety-course-1/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(10) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 08:00:00" ["end_date"]=> string(19) "2016-06-10 17:00:00" ["purchase_limit"]=> string(1) "0" } }
  13. I've got a function in my WordPress functions file that sends a Word doc based on what venue the ordered product is from. However I also need to be able to paste variables such as the customer name and others onto the specified word document. It also needs to be in specific places. How can I go about doing this? Please let me know if you have any idea or don't understand me! Thanks!
  14. Hello, i'm using the plugin recipe card. https://pt.wordpress.org/plugins/recipe-card/ Unfortunly the plugin stopped working because the servers of the owner company seems to have closed of something like that. I'd like to keep using the plugin but this way i can't add or edit recipes as it allways try to connect to the server of the company... Anyone can help me modify this to send only to my own server and keep using the plugin? i have a lot of recipes on my site and it's not a great idea to change plugin and insert all again... The link to the plugin is here: https://pt.wordpress.org/plugins/recipe-card/ Here is the php of the plugin : https://endbox.com/yumprint-recipe.zip Can anyone please help me? yumprint-recipe.php
  15. I'm trying to out put all Crelly Slider Alias's within Redux Framework Options in a Dropdown Select. I must confess i'm a novice at PHP ... I've attached the code from within Crelly Slider to show how it outputs the Alias names and i've also attached the Redux Code for the dropdown with an existing select .. I somehow need to output a list of all Crelly Alias's into 'options' => array( 'asc' => 'Ascending', 'desc' => 'Descending' ), Obviously replacing the exisiting options. Here is the full Crelly Output <?php global $wpdb; $sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'crellyslider_sliders'); if(!$sliders) { echo '<div class="cs-no-sliders">'; _e('No Sliders found. Please add a new one.', 'crellyslider'); echo '</div>'; echo '<br /><br />'; } else { ?> <table class="cs-sliders-list cs-table"> <thead> <tr> <th colspan="5"><?php _e('Sliders List', 'crellyslider'); ?></th> </tr> </thead> <tbody> <tr class="cs-table-header"> <td><?php _e('ID', 'crellyslider'); ?></td> <td><?php _e('Name', 'crellyslider'); ?></td> <td><?php _e('Alias', 'crellyslider'); ?></td> <td><?php _e('Shortcode', 'crellyslider'); ?></td> <td><?php _e('Actions', 'crellyslider'); ?></td> </tr> <?php foreach($sliders as $slider) { echo '<tr>'; echo '<td>' . $slider->id . '</td>'; echo '<td><a href="?page=crellyslider&view=edit&id=' . $slider->id . '">' . $slider->name . '</a></td>'; echo '<td>' . $slider->alias . '</td>'; echo '<td>[crellyslider alias="' . $slider->alias . '"]</td>'; echo '<td> <a class="cs-edit-slider cs-button cs-button cs-is-success" href="?page=crellyslider&view=edit&id=' . $slider->id . '">' . __('Edit Slider', 'crellyslider') . '</a> <a class="cs-delete-slider cs-button cs-button cs-is-danger" href="javascript:void(0)" data-delete="' . $slider->id . '">' . __('Delete Slider', 'crellyslider') . '</a> </td>'; echo '</tr>'; } ?> </tbody> </table> <?php } ?> <br /> <a class="cs-button cs-is-primary cs-add-slider" href="?page=crellyslider&view=add"><?php _e('Add Slider', 'crellyslider'); ?></a> And my Redux Option array( 'id' => 'alias_select', 'type' => 'select', 'title' => __( 'Alias Select', 'ultra-web-admin' ), 'desc' => __( 'Select Slider Alias.', 'ultra-web-admin' ), 'options' => array( 'asc' => 'Ascending', 'desc' => 'Descending' ), 'default' => 'asc' ), I would be really grateful if anyone could assist me . Thank you !
  16. Trying to add a product search bar to Wordpress admin bar backend that will do Woocommerce product search. It will be located in the backend Admin Menu bar a top so that no matter where you are in back end it will allow to search woo's products. I am close but faulting at small stumbling block. When trying to use the search it is defaulting to post search instead of products. //Add Search To Admin Bar function boatparts_admin_bar_form() { global $wp_admin_bar; $wp_admin_bar->add_menu(array( 'id' => 'boatparts_admin_bar_form', 'parent' => 'top-secondary', 'title' => '<form method="get" action="'.get_site_url().'/wp-admin/edit.php?post_type=product"> <input name="s" type="text" style="height:20px;margin:5px 0;line-height:1em;"/> <input type="submit" style="height:18px;vertical-align:top;margin:5px 0;padding:0 2px;" value="Search Products"/> </form>' )); } add_action('admin_bar_menu', 'boatparts_admin_bar_form'); Have it in my child theme's function.php. Driving me nuts trying to figure it out.
  17. Hi, I am absolutly beginner in PHP, AJAX. In my Wordpress page I have following scene: 1. input box for name 2. combobox from country-> combo for cities depend of selected country Button for search in MySQL database After submit the database return result in a table (user, country, city, mobile, email, etc.) with 2 editable (mobile, email) input column and I put Update button in every row. My questions: 1) If I change one data on the editable column how can I know the number of row? 2) How can I run the update script without refresh page? Thanks for your answer. //UserInfo-modify.php <?php include_once('db.php'); $name = $_POST['nev']; $country = $_POST['megye']; $error = ""; $city = ""; $nodata = ""; $ID = 0; if (($country=="Bács-Kiskun")||($country=="Baranya")||($country=="Békés")||($country=="Borsod-Abaúj-Zemplén")||($country=="Csongrád")|| ($country=="Fejér")||($country=="Győr-Moson-Sopron")||($country=="Hajdú-Bihar")||($country=="Heves")||($country=="Jász-Nagykun-Szolnok")|| ($country=="Komárom-Esztergom")||($country=="Nógrád")||($country=="Pest")||($country=="Somogy")||($country=="Szabolcs-Szatmár-Bereg")|| ($country=="Tolna")||($country=="Vas")||($country=="Veszprém")||($country=="Zala")) { $city = $_POST['telepules']; if ($city=="---") $error = "-city"; } else { $error = "-country-city"; } mysqli_set_charset($conn,"utf8"); if (($city!="") AND ($name!="")) { $query = mysqli_query($conn,"SELECT nev,kor,megye,telepules,utca,mobil,email FROM `nrqadatr` WHERE nev='$name' AND telepules='$city'") or die("userinfo-modify-36 ".mysqli_error($conn));} else if (($city=="") AND ($name=="")) { $nodata = '1'; echo "Name and city = 0!"; } else if (($city!="") AND ($name=="")) { $query = mysqli_query($conn,"SELECT nev,kor,megye,telepules,utca,mobil,email FROM `nrqadatr` WHERE telepules='$city'") or die("userinfo-modify-45 ".mysqli_error($conn));} else if (($city=="") AND ($name!="")) {$query = mysqli_query($conn,"SELECT nev,kor,megye,telepules,utca,mobil,email FROM `nrqadatr` WHERE nev='$name'") or die("userinfo-modify-49 ".mysqli_error($conn));} if ($nodata!='1') { $rowcount=mysqli_num_rows($query); if ($rowcount>0) { echo '<table>'; $arrayofrows = array(); echo ' <table border=1> <tr style="background-color:#EFFBFB; font-weight:bold; border: 1px solid black;"> <td style="font-size:14px;">ID</td> <td style="font-size:14px;">Name</td> <td style="font-size:14px;">City</td> <td style="font-size:14px;">Age</td> <td style="font-size:14px;">Address</td> <td style="font-size:14px;">Mobil</td> <td style="font-size:14px;">E-mail</td> <td style="font-size:14px;">Operation</td> </tr>'; } else echo "\r\n<B><font color='red'>No data //my_script.js $("#sub").click( function() { $.post( $("#myForm").attr("action"), $("#myForm :input").serializeArray(), function(info) { $("#result").html(info); }); clearInput(); }); $("#myForm").submit( function() { return false; }); function clearInput() { $("#myForm :input").each( function() { $(this).val(''); }); } ."; while ($data = mysqli_fetch_array($query)) { $ID = $ID+1; $data_nev=$data["nev"]; echo ' <tr style="background-color:#EFFBFB; border: 1px solid black;"> <td><input type="radio" name="$kivalasztott_sor" value="AG"></td> <td style="font-size:14px;">'.$data["nev"].'</td> <td style="font-size:14px;">'.$data["telepules"].'</td> <td style="font-size:14px;">'.$data["kor"].'</td> <td style="font-size:14px;">'.$data["utca"].'</td> <td><input type="text" value='.$data["mobil"].'></td> <td><input type="text" value='.$data["email"].'></td> <td onclick="cellOnclick()"><a href="#" onclick="linkOnclick()" style="text-decoration: none;"> <input type=button value="UPDATE" myFunction(this); return false;"></button></td> </tr>'; } echo '</table>'; } unset($name); unset($kor); unset($country); unset($error); unset($city); unset($nodata); unset ($data_nev); ?> //Wordpress (main) page [insert_php] include '/select_list_cities.php'; [/insert_php] <html><head><meta charset="utf-8" /><script src="/ajax_select_cities.js" type="text/javascript"></script> </head><body><form id="myForm" action="/userInfo-modify.php" method="post"> Name*:<br><input type="text" name="nev"> <p> [insert_php] echo $re_html;[/insert_php]<br class="clear" /> <br class="clear" /> <button id="sub">Search</button> <br><br></form> <span id="result"></span> <div id="data"><?php echo $result; ?></div> <script type="text/javascript" src=" http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js"></script> <script src="/my_script.js" type="text/javascript"></script> </body> </html>
  18. Hello to everybody. I built a House Booking System site with this theme that i bought. BYT. They don't do custom coding. http://themeforest.net/item/book-your-travel-online-booking-wordpress-theme/5632266 We need to modify the PHP to add some capabilities. 1-The BYT search engine for now only filters some of the input fields (Accomodation details) like Where (location), When (dates in and out), and some other we don't need. We need to filter by number of people too. That is; Where, When, How many people. 2- Add a booking button in some sidebar. The booking is performed from the House page but i would like to copy the code to another php file (sidebar) Easy if u know how to do it. 3- Synch the BYT reservations with iCal or Google calendar. But BYT doesn't support APIs.... so i imagine is not possible. And sure expensive. But there is a big need for that apart from myself. I'm sure tha anyone that does it will become fameous.... I'm ready to pay for it. stayinahouse.com
  19. I am only new to php (getting there) but have a wordpress site that is using freshizer images resizing. All of the images are being cached as 100% black images instead of their original colours. Has anyone had this before?
  20. Hi all, I'm running an update sql query from my wordpress functions file when a form is submitted. This grabs the address fields, uses the Google API and gets the lat and lng co-ords so I can utilise these elsehwere. My issue is the warning I get when I submit the form. My codes below: $meta_value = array( 'address' => $full_address, 'lat' => $lat, 'lng' => $lng ); #$location = array($full_address,$lat,$lng); print_r($meta_value); $wpdb->show_errors(); #$wpdb->update( $table, $data, $where ); $wpdb->update( $wpdb->postmeta, array( 'meta_value' => $meta_value ), array( "meta_key" => 'location', "post_id" => $post_id )); $wpdb->print_error(); var_dump( $wpdb->last_query ); However, when it runs, I get the warning: Warning: mysql_real_escape_string() expects parameter 1 to be string, It should pass in the values from the Array: Array ( [address] => Address 1, Town, County AB12 3CD, United kingdom [lat] => 50.123456 [lng] => 0.1234567 ) I can't see for looking now so any help is much appreciated!
  21. Hello I have wordpress tube template, i want to remove video player in single page and want to use normal post insted, could anyone help me for that. my singlepage php code is <?php get_header(); ?> <div class="wrap grid rStatic player"> <div class="mainw"> <?php setPostViews(get_the_ID()); ?> <?php while ( have_posts() ) : the_post(); ?> <div class="main l200 r300"> <?php $player = get_option('mtn_player'); if ($player == "top") { include (TEMPLATEPATH . '/inc/layout/player2.php'); } elseif ($player == "bottom") { include (TEMPLATEPATH . '/inc/layout/player1.php'); } else { get_template_part( 'inc/layout/player1', get_post_format() ); } if(get_option('mtn_related_title')){ $title = get_option('mtn_related_title'); } else { $title = __('Video Suggestions', 'bestia'); } ?> </div> </div> <?php endwhile; // end of the loop. ?> <div class="main l200" id="suggestions"> <h2><?php echo $title; ?></h2> <?php include (TEMPLATEPATH . '/inc/related-videos.php'); echo '</div></div>'; ?> <div class="right300 rZone"><div class="holder"> <?php if (get_option('mtn_adsright') <> '') { echo stripslashes(get_option('mtn_adsright')); } else { } echo '</div></div>'; get_template_part( 'inc/sidebar/sidebar-video', get_post_format() ); echo '</div></div>'; get_footer(); ?>
  22. Hi, I'm having a real problem with one of my Wordpress category pages. I use a 3-column grid system on this page and just recently I needed to add an advert to the page, so I thought I would do one query at the top with the first two posts, then add the advert to complete the row. Then I would use a second query underneath creating the posts using the traditional grid system with 3 in each row. This is working well except for the pagination, which adds the two items form the first query everytime it paginates. You can see this in action at http://soundsandcolours.com/music/ Does anyone know what I can do to make the Pagination ignore the first query, and just keep running the second query instead. I've included all of my code below: 1st Query: $query_string; $musiccat_posts = new WP_Query($query_string."&posts_per_page=2"); if ($musiccat_posts->have_posts()): $musiccatIDs = array(); while($musiccat_posts->have_posts()):$musiccat_posts->the_post(); $musiccatIDs[] = get_the_ID(); 2nd Query: $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1; global $moremusiccat_query; $music_args = array( 'cat' => 1841, 'posts_per_page' => 15, 'post__not_in' => $musiccatIDs, 'paged' => $paged ); $moremusiccat_query = new WP_Query( $music_args ); while ($moremusiccat_query -> have_posts()) : $moremusiccat_query -> the_post(); ?> Pagination Code: $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $moremusiccat_query->max_num_pages ) ); Any help would be massively appreciated!
  23. Hi guys, i'm attempting to display Wordpress Categories per Post. I'm aware of this simple standard method <?php the_category( ', ' ); ?>. But i actually just want a list of the categories, unformatted and unlinked to the category itself, actually i just want the category name. So i am using this method <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?> This works perfectly if the post only has 1 category, but in the event of multiple categories, there is no separator. Could anybody assist me in adding a separator which will not append to the last in the list ? I would be grateful for any assistance but please bare in mind i am a mere novice. Thanks
  24. Hello i am working with woocommerce where i have products displayed on shop page now i want that user can purchase product only once. So i am trying to get the orders of user and trying to redirect to the user to my account page so i am using following code in functions.php <?php $user_id = get_current_user_id(); $current_user= wp_get_current_user(); $customer_email = $current_user->email; $args = array( 'post_type' => 'product', 'posts_per_page' => 12 ); $loop = new WP_Query( $args ); if ( $loop->have_posts() and is_page( 1036 )) { echo "has post"; } else { echo do_shortcode('[ recent_products per_page=20" columns="4" orderby="rand" order="rand]'); } ?> but its not working anyone can help.
  25. Hello I have a strange issue. (or maybe not for you). In wordpress you can put instagram as iframes simply by writing the url on a separate line. That works fine. But I needed to get the url proglamaticly so I did a php code like the following <?php echo '<iframe height="1250px" width="96%" frameborder="0" scrolling="no" src="', htmlspecialchars($_GET["insta"]), '">', '</iframe>'; ?> What it does is that it takes from the url the variable insta and puts that on the page as an iframe. ex. www.myblog.com/specialpage?insta=https://instagram.com/p/8JEjgAicX7/ So this doesent work. it gives an empty iframe, but if I only write that address in a wordpress post or page it do work. However with the exact same code with /embed/ added do work. Problem is that does not show the captions and hashtags. www.myblog.com/specialpage?insta=https://instagram.com/p/8JEjgAicX7/embed/ <-- this is working I dont know if this a php-wordpress or what problem. but if you have a clue then your help is appreciated
×
×
  • 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.