Jump to content

Search the Community

Showing results for tags 'wordpress'.

  • 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 (PhpStorm, VS Code, 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

  1. Hi all, i am new on here, and it appears i may need to stick around, I am having a massive headache creating custom widgets for a site i am building in-house. Essentially i require 6 custom widgets per page as illustrated in the attachement. The boxes beneath the large slider. I want the widgets to be managed from the widget section (sidebar widget) and moveable around the site . site testing is live http://mediacrisp.byethost3.com/ i am working through this page by page, but need to get the widgets for the first page up and running tonight (next 12 hours) could anyone advise me how to build them and what to code and where to code, once i have my head around the first page it should be very simple from there... diagram of aim https://www.dropbox.com/s/t0phe9el7ypommr/example%20small.jpg
  2. Hi Guys i am getting the following error when trying to install a theme in my wordpress. "Parse error: syntax error, unexpected '}' in /home/partypor/rightawayprinting.com/wp-content/themes/daisho/framework/admin/background-menu.php on line 1" This is the code for the background-menu.php. Can someone please help me find whats wrong. Thanks! <?php add_action( 'admin_init', 'backgroundmenuregs' ); add_action( 'wp_head', 'add_bg_changerstyle' ); function backgroundmenuregs(){ wp_enqueue_script('jquery'); wp_register_style( 'FlowTypographyMainStylesheet', WP_PLUGIN_URL . '/typography/js/colorpicker/css/colorpicker.css' ); wp_register_style( 'FlowTypographyLayoutStylesheet', WP_PLUGIN_URL . '/typography/js/colorpicker/css/layout.css' ); wp_register_script('jquery_colorpicker_script', WP_PLUGIN_URL . '/typography/js/colorpicker/js/colorpicker.js', array('jquery'), '1.0' ); wp_enqueue_style( 'FlowTypographyMainStylesheet' ); wp_enqueue_style( 'FlowTypographyLayoutStylesheet' ); wp_enqueue_script('jquery_colorpicker_script'); } function add_bg_menu(){ //must check that the user has the required capability if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } echo '<div class="wrap">'; echo "<h2>" . __( 'Styling', 'menu-test' ) . "</h2>"; if($_POST['bg_submit_h'] && $_POST['bg_submit_h'] == "Y"){ $bgrepeat = array("repeat"=>"repeat","repeatx"=>"repeat-x","repeaty"=>"repeat-y","norepeat"=>"no-repeat"); update_option("bgchanger_color", $_POST['bc']); update_option("bgchanger_imgsrc", $_POST['bi']); if($_POST['bpx'] == "left" || $_POST['bpx'] == "center" || $_POST['bpx'] == "right"){ update_option("bgchanger_posx", $_POST['bpx']); } if($_POST['bpy'] == "top" || $_POST['bpy'] == "center" || $_POST['bpy'] == "bottom"){ update_option("bgchanger_posy", $_POST['bpy']); } if($_POST['ba'] == "fixed" || $_POST['ba'] == "scroll"){ update_option("bgchanger_attach", $_POST['ba']); } if(array_key_exists($_POST['br'], $bgrepeat)){ update_option("bgchanger_repeat", $bgrepeat[$_POST['br']]); } ?> <div class="updated"><p><strong><?php _e('settings saved.', 'menu-test' ); ?></strong></p></div> <?php } $bgcval_bc = get_option("bgchanger_color"); $bgcval_bi = get_option("bgchanger_imgsrc"); $bgcval_bpx = get_option("bgchanger_posx"); $bgcval_bpy = get_option("bgchanger_posy"); $bgcval_ba = get_option("bgchanger_attach"); $bgcval_br = get_option("bgchanger_repeat"); ?> <script type="text/javascript">jQuery(document).ready(function(){jQuery(".attcolorpicker").each(function(){jQuery(this).ColorPicker({onShow:function(cp){jQuery(cp).fadeIn(500);return false;},onHide:function(cp){jQuery(cp).fadeOut(500);return false;},onChange:function(hsb, hex, rgb){jQuery(this).parent().find('.attcolorpicker').val('#'+hex);jQuery(this).parent().find('.colorSelector div').css('backgroundColor', '#'+hex);jQuery(this).parent().find('.colorSelector').ColorPickerSetColor(hex);}});jQuery(this).parent().find('.colorSelector').ColorPicker({onShow:function(cp){jQuery(cp).fadeIn(500);return false;},onHide:function(cp){jQuery(cp).fadeOut(500);return false;},onChange:function(hsb, hex, rgb){jQuery(this).parent().find('.attcolorpicker').val('#'+hex);jQuery(this).parent().find('.colorSelector div').css('backgroundColor', '#'+hex);jQuery(this).parent().find('.attcolorpicker').ColorPickerSetColor(hex);}});});});</script> <form method="post" action=""> <table class="form-table"> <tr><th>Background color</th><td> <input type="text" class="attcolorpicker" name="bc" value="<?php if($bgcval_bc) print($bgcval_bc); ?>"> <div class="colorSelector"><div<?php if($bgcval_bc) print(" style=\"background-color:".$bgcval_bc.";\""); ?>></div></div> </td></tr> <tr><th>Background image</th><td><input type="text" name="bi" value="<?php if($bgcval_bi) print($bgcval_bi); ?>"><span href="#" title="" class="briskuploader button">Upload</span><br/><div class="briskuploader_preview"></div></td></tr> <tr><th>Background position</th><td><select name="bpx"><option value="left"<?php if($bgcval_bpx=="left") print(" selected=\"selected\""); ?>>left</option><option value="center"<?php if($bgcval_bpx=="center") print(" selected=\"selected\""); ?>>center</option><option value="right"<?php if($bgcval_bpx=="right") print(" selected=\"selected\""); ?>>right</option></select><select name="bpy"><option value="top"<?php if($bgcval_bpy=="top") print(" selected=\"selected\""); ?>>top</option><option value="center"<?php if($bgcval_bpy=="center") print(" selected=\"selected\""); ?>>center</option><option value="bottom"<?php if($bgcval_bpy=="bottom") print(" selected=\"selected\""); ?>>bottom</option></select></td></tr> <tr><th>Background attachment</th><td><select name="ba"><option value="scroll"<?php if($bgcval_ba=="scroll") print(" selected=\"selected\""); ?>>Scroll</option><option value="fixed"<?php if($bgcval_ba=="fixed") print(" selected=\"selected\""); ?>>Fixed</option></select></td></tr> <tr><th>Background repeat</th><td><select name="br"><option value="repeat"<?php if($bgcval_br=="repeat") print(" selected=\"selected\""); ?>>repeat</option><option value="repeatx"<?php if($bgcval_br=="repeat-x") print(" selected=\"selected\""); ?>>repeat-x</option><option value="repeaty"<?php if($bgcval_br=="repeat-y") print(" selected=\"selected\""); ?>>repeat-y</option><option value="norepeat"<?php if($bgcval_br=="no-repeat") print(" selected=\"selected\""); ?>>no-repeat</option></td></tr> </table> <p class="submit"> <input type="hidden" name="bg_submit_h" value="Y"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> </p> </form> </div> <?php } function add_bg_changerstyle(){ $bgcval_bc = get_option("bgchanger_color"); $bgcval_bi = get_option("bgchanger_imgsrc"); if($bgcval_bc || $bgcval_bi){ print("<style type=\"text/css\"> body{ "); if($bgcval_bc){ print("background-color:".$bgcval_bc.";"); } if($bgcval_bi){ if($bgcval_bi == "none"){ print("background-image:none;"); }else{ print("background-image:url(".$bgcval_bi.");"); $bgcval_bpx = get_option("bgchanger_posx"); $bgcval_bpy = get_option("bgchanger_posy"); $bgcval_ba = get_option("bgchanger_attach"); $bgcval_br = get_option("bgchanger_repeat"); if($bgcval_bpx == "left" || $bgcval_bpx == "center" || $bgcval_bpx == "right"){ if($bgcval_bpy == "top" || $bgcval_bpy == "center" || $bgcval_bpy == "bottom"){ print("background-position:".$bgcval_bpx." ".$bgcval_bpy.";"); } } if($bgcval_ba == "fixed" || $bgcval_ba == "scroll"){ print("background-attachment:".$bgcval_ba.";"); } if($bgcval_br == "repeat" || $bgcval_br == "repeat-x" || $bgcval_br == "repeat-y" || $bgcval_br == "no-repeat"){ print("background-repeat:".$bgcval_br.";"); } } } print(" } </style>"); } } ?>
  3. I have a wordpress website but I am getting too much spam from the website in the form of comments. Initially form from website was also sending too much messages but than I installed a eye verification there so that part is good. But now when I login to admin panel I can see 1000s of comments which I have to delete manually. What are the best ways to stop this on any wordpress websites? I know I can buy akismet but do not want to spend any more. Any free ways?
  4. Hello, I tried many WP plugins to create automatic alt tags site-wide. None of the available plugins seem to work (I Tried SEO Friendly Images, Wordpress SEO Images, WP Image SEO) even with the default theme... Any other plugins anyone can suggest, please? Anyway, I found this code that's supposed to go into the functions.php of the theme, but it doesn't seem to work... It's supposed to check for images without an alt tag and fill in the post title - can anyone here please help me with making this code to change ALL alt tags by putting the post title in them and making this code work in the first place..? function add_alt_tags($content) { global $post; preg_match_all('/<img (.*?)\/>/', $content, $images); if(!is_null($images)) { foreach($images[1] as $index => $value) { if(!preg_match('/alt=/', $value)) { $new_img = str_replace('<img', '<img alt="'.$post->post_title.'"', $images[0][$index]); $content = str_replace($images[0][$index], $new_img, $content); } } } return $content; } add_filter('the_content', 'add_alt_tags', 99999); Thank you very much!
  5. Hello Everyone I've installed wordpress already for a sex education website. I need to show a warning page before a visitor can proceed to the main website. I was wondering if there's a plugin that I can install for wordpress that shows a warning message/page before someone can entre the main website. If not, is this my best choice to create a custome HTML page, add the put the wanring text needed, then place two links for I agree & I don't agree , for example? but in this case, I have to move the wordress installation to another location right? thank you so much
  6. Hi there I have the following page, which includes a php mail function and sends a few of the fields via email successfully. Once the form is submitted, another page is displayed called 'Thank you'. (?page_id=2561) Question 1: Is there a way to reference all of the fields from the html tables at once in the php script (to email all the fields) or is it necessary to call each fields as I have done with 'companyName' etc? Question 2: How would I include all of the fields 'submitted contents' to display on the 'Thank you' page (?page_id=2561) - as I would like to add a 'print to pdf' button on this page, whereby the user can print the submitted form contents. I would greatly appreciate any advice / direction :) Thank you so much <?php { //send email $email = $_REQUEST['email'] ; $confName = $_REQUEST['conferenceName'] ; $companyName = $_REQUEST['companyName'] ; mail("myemail@yahoo.com", $confName, $companyName, "From:" . $email); } ?> <form method="post" id="quote" action="?page_id=2561"> <script type="text/javascript">// <![CDATA[ jQuery('#quote').keyup(function (){ doTotal(this); calcMenu(this); }); // ]]></script> <table id="table1" border="0" cellspacing="3" cellpadding="3"> <tbody> <tr> <td>Enquiry Date</td> <td> <div align="center"><input type="text" name="dateToday" size="25" /></div></td> </tr> <tr> <td>Conference Name</td> <td> <div align="center"><input type="text" name="conferenceName" size="25" /></div></td> </tr> <tr> <td>Company Name</td> <td> <div align="center"><input type="text" name="companyName" size="25" /></div></td> </tr> <tr> <td>Special Requests</td> <td><textarea name="comment" rows="5" cols="26"></textarea></td> </tr> </tbody> </table> <table id="table2" border="0" cellspacing="3" cellpadding="3"> <tbody> <tr> <td>First Name</td> <td> <div align="center"><input type="text" name="firstName" size="25" /></div></td> </tr> <tr> <td>Last Name</td> <td> <div align="center"><input type="text" name="lastName" size="25" /></div></td> </tr> <tr> <td>Tel No</td> <td> <div align="center"><input type="text" name="telNo" size="25" /></div></td> </tr> <tr> <td>Cell</td> <td> <div align="center"><input type="text" name="cellNo" size="25" /></div></td> </tr> <tr> <td>Email</td> <td> <div align="center"><input type="text" name="email" size="25" /></div></td> </tr> <tr> <td><input onclick="formReset()" type="button" value="Reset form" /></td> </tr> <tr> <td><input type='submit'></td> </tr> </tbody> </table> <table id="tablex" border="1" cellspacing="3" cellpadding="3"> <tbody> <tr> <th scope="col" width="30"> <div align="center">Date</div></th> <th scope="col" width="128"> <div align="center">Amount of Delegates ½ Day Conference @ R 240 pp</div></th> <th width="112"> <div align="center">Amount of Delegates Full Day Conference @ R 260 pp</div></th> <th width="112"> <div align="center">Menu No</div></th> <th width="112"> <div align="center">Price pp for Menu (1-7: R70, 8-10 R85, 11: R105, 12: R85)</div></th> <th width="112"> <div align="center">Total Persons for meals</div></th> <th width="112"> <div align="center">Amount of Single Rooms @ R 480 pp</div></th> <th width="112"> <div align="center">Amount of Double Rooms @ R 720 pp</div></th> <th width="134"> <div align="center">Total for the day</div></th> </tr> <tr> <td> <div align="center"><input type="text" name="date1" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday1" size="5" maxlength="10" /></div></td> <td> <div align="center"><input type="text" name="fullday1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons1" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms1" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms1" size="5" /></div></td> <td> <div align="center"><input type="text" name="total1" size="5" /></div></td> </tr> <tr> <td> <div align="center"><input type="text" name="date2" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday2" size="5" /></div></td> <td> <div align="center"><input type="text" name="fullday2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons2" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms2" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms2" size="5" /></div></td> <td> <div align="center"><input type="text" name="total2" size="5" /></div></td> </tr> <tr> <td> <div align="center"><input type="text" name="date3" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday3" size="5" /></div></td> <td> <div align="center"><input type="text" name="fullday3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons3" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms3" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms3" size="5" /></div></td> <td> <div align="center"><input type="text" name="total3" size="5" /></div></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> </form>
  7. Hi there I am trying to use the php mail function, but I am receiving this error: The requested URL /mailform.php was not found on this server. PHP <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; mail("myemail@yahoo.com", $subject, $message, "From:" . $email); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text'><br> Subject: <input name='subject' type='text'><br> Message:<br> <textarea name='message' rows='15' cols='40'> </textarea><br> <input type='submit'> </form>"; } ?> ( I replaced my email address with "myemail@yahoo.com" just for the forum... Thank you
  8. Hi I put the following code into my functions.php file. Here's what I want: 1. I want the cookie to be set only when the visitor goes to Post 1. 2. When someone visits Post 2, if they have the cookie, they get redirected to Post 3. If they don't have the cookie, nothing happens. Now it seems to be working, but the problem is sometimes, when the cookie isn't set, I get redirected to Page 3 from the home page :s. I have no idea why. I should mention I know nothing about coding. The code below is stuff I got online, mixed and matched it, and did some trial and error with my blog. function set_newuser_cookie() { $currentURL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //THE ABOVE GETS THE CURRENT URL if (!isset($_COOKIE['subscriber']) && $currentURL == 'http://mysite.com/post1') { setcookie('subscriber', no, 0, COOKIEPATH, COOKIE_DOMAIN, false); //THE ABOVE SETS A COOKIE IF IT FINDS THE CURRENT URL IS /POST1 } } add_action( 'init', 'set_newuser_cookie'); //I DON'T KNOW WHAT THE ABOVE IS, BUT I HEAR IT'S IMPORTANT $currentURL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //THE ABOVE GETS THE URL AGAIN if ( isset( $_COOKIE["subscriber"] ) && $currentURL == 'http://mysite.com/post2' ) : header( "Location: http://mysite.com/post3" ); endif; //THE ABOVE REDIRECTS THE VISITOR TO POST3 ON 2 CONDITIONS: 1. THAT THE COOKIE IS SET, 2. THAT THE CURRENT URL IS /POST2 Please help!
  9. I hope this is the right place to post this. I have wordpress installed on one domain (iaddicshelters.net) AND I have another non-wordpress application on a second domain (iaddic.info). The first is a self hosted wordpress and the second is a windows server running a particular application. To execute the application on the non-wordpress domain (iaddic.info) I enter a url like this: http://iaddic.info/webs/cis/config/Configurator.aspx?cid=c06b50fe-e087-40b0-8434-d763fabd1515&mid=c06b50fe-e087-40b0-8434-d763fabd1515&src=C The cid= is used as the filename of the result of executing the application and the mid is a specific configuration that is being run. The cid captures the result of running the mid configuration... That said: I can not just place a link to the url because every user would essentially store the information in the same file (the cid). I want to prepend the cid with the currently logged in user and date and time. Lets say John Harris (a made up username) is the logged in user and John is about to run the application on the iaddic.info domain; I would like the cid to now read: http://iaddic.info/webs/cis/config/Configurator.aspx?cid=username-timestamp-c06b50fe-e087-40b0-8434-d763fabd1515&mid=c06b50fe-e087-40b0-8434-d763fabd1515&src=C Does anyone know how to insert this information into the url so that when John depresses a "launch aplication" button the url will of the cid is prepended? In some regards this could be looked at as a concatenation of the base url the username the timestamp and the cid and mid string. Doing this will also allow John to copy this url at a later date and retrieve the results of that particular session thatcontains his username and timestamp. I am really stuck here and your help is most appreciated...thank you
  10. Hello, I have been trying to figure out how to write a certain php query and for the life of me I can not figure it out. I've tried searching on google like a mad man and still can not figure it out. Maybe Im missing something, Im not sure. I came across this site while googlin for answers. The php code is for a wordpress site I am working on. Here is my current code - <?php $custom_terms = get_terms('videoscategory'); $other_custom_terms = get_terms('product_category'); foreach(array($custom_terms as $custom_term) { wp_reset_query(); $args = array('post_type' => 'product', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'videoscategory', 'field' => 'slug', 'terms' => $custom_term->slug ), array( 'taxonomy' => 'product_category', 'field' => 'slug', 'terms' => $other_custom_term->slug ), ) ); $loop = new WP_Query($args); if($loop->have_posts()) { echo '<h1 style="margin-top:10px;">'.$custom_term->name.'</h1>'; while($loop->have_posts()) : $loop->the_post(); echo '<h2><a href="'.get_permalink().'">'.get_the_title().'</a></h2>'; endwhile; } } ?> Im trying to list all the posts that are in both of my custom taxonomies, however when I try using the code nothing shows but when I use 1 taxonomy at a time, with one array, it works perfectly. Someone on gave me some advice but I do not understand it - generate array of your second taxonomy terms and feed it into the query - What exactly is that advice telling me to do? Any help is appreciated. Thanks.
  11. Hello everyone, This is very weird, I have installed a theme, modified it, and it was working great, after a while, the theme started appearing in the admin area please check screenshot to see what I mean I don't know what caused this or how to fix it any help?
  12. Hi, I'm having a problem ever since I switched hosting servers. My contact page form and other email forms aren't working on the server. This is what suport emailed me: Mar 24 19:59:26 hercules suhosin[30188]: ALERT - mail() - To: headers aren't allowed in the headers parameter. (attacker '99.108.165.151', file > '/home/manilade/public_html/wp-includes/class-phpmailer.php', line 769) Mar 24 20:00:19 hercules suhosin[5929]: ALERT - mail() - To: headers aren't allowed in the headers parameter. (attacker '99.108.165.151', file '/home/manilade/public_html/wp-includes/class-phpmailer.php', line 769) When I deleted 769, I got 2 errors. 1. Undefined variable line 771: $isSent = ($rt == 1) ? 1 : 0; 2. Undefined variable line 778: if(!$rt) { Does anyone know how to fix this? thanks.
  13. Helo, I am using the adapt theme from wp explorer. I recently configured properly the theme. After several tweakings for some reason when I hover the the dropdown menu above the slider (flexslider) and then try to click a sub menu it wont click instead its disappearing. I already tried to remove the slider and then try it again but still getting the same output. (Picture ->http://cfsmplus.com/prob.JPG) I'm really having a hard time figuring this is out. I dont know if this all about the jquery or what. Please help. Thanks.
  14. Hi, I am building an RSS Aggregator plugin for my Wordpress Installation. One of the feeds I am using is: https://news.google.co.uk/news/feeds?pz=1&cf=all&ned=uk&hl=en&cf=all&as_qdr=w&output=rss&q As you can see this feeds content is a table of data including news headline, excerpt and a tiny thumbnail image. How is it possible for me to extract the actual full article text and the large Image from the <link> tag of the RSS item or does it look like I have the wrong news feed? Thanks for advice with this.
  15. Visual instruction: http://bit.ly/14JyZAz The theme is here : http://demo.wpzoom.com/?theme=meeta I want to remove the title of the site from appearing at the header. But at the same time not removing the title of the site from showing when searching on google or appearing as the name of the tab. I am a complete newbie and would appreciate the help very much, my friends.
  16. Hi, I am a complete newbie when comes to coding. I'd appreciate very much the help. There's this WordPress plugin where you cloak your links (the plugin here --> http://bit.ly/13AYpUF). It redirects the link using this model: websitename.com/go/username I want the name in the link instead of "go" to be "list" -- like this : websitename.com/list/username (p.s. instead of the name "list" I may choose a different one.) I tried myself to replace within the code the name "go" with "list", but after doing this, when clicking the link it showed a 404 error page. Thank you VERY much!
  17. Wordpress Templates problem I have custom post types but when I try and view the pages it just defaults http://d698815.eechost.com This is a custom post type called Polish but its just defaulting to the homepage http://d698815.eechost.com/polish/hh/ Any ideas?
  18. Hello, This is my first post on the forum and I'm super glad that I found it! hopefully you can help me. I am trying to edit a wordpress plugin (https://github.com/samsonw/wp-grid-archives). It is an archive plugin that displays post title and excerpt sorted by date. I want to get it to display the post thumbnail or featured image. I posted the code I think i need to be changing at the bottom. I tried various things like placing <?php the_post_thumbnail( $size, $attr ); ?> But I can't work it out. Thank you very much for any help. It will be greatly appreciated! Luke define('GRID_ARCHIVES_VERSION', '1.6.0'); /** * Guess the wp-content and plugin urls/paths */ // Pre-2.6 compatibility if ( ! defined( 'WP_CONTENT_URL' ) ) define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); if ( ! defined( 'WP_CONTENT_DIR' ) ) define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); if ( ! defined( 'WP_PLUGIN_URL' ) ) define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); if ( ! defined( 'WP_PLUGIN_DIR' ) ) define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); define('GRID_ARCHIVES_POSTS_TRANSIENT_KEY', 'grid_archives_posts'); define('GRID_ARCHIVES_OPTION_NAME', 'grid_archives_options'); if (!class_exists("GridArchives")) { class GridArchives { var $options; var $style; function GridArchives() { $this->plugin_url = WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)); add_action('wp_print_styles', array(&$this, 'load_styles')); add_action('admin_print_scripts', array(&$this, 'load_admin_scripts')); add_action('wp_print_footer_scripts', array(&$this, 'load_scripts')); add_shortcode('grid_archives', array(&$this, 'display_archives')); // admin menu add_action('admin_menu', array(&$this, 'grid_archives_settings')); // invalidate cache add_action('save_post', array(&$this, 'delete_cache')); add_action('edit_post', array(&$this, 'delete_cache')); add_action('delete_post', array(&$this, 'delete_cache')); register_activation_hook(__FILE__, array(&$this, 'install')); } // Grab all posts and filter them into an array private function get_posts($category) { // If we have a non-expire cached copy of the filtered posts array, use that instead if($posts = get_transient(GRID_ARCHIVES_POSTS_TRANSIENT_KEY)) { return $posts; } $category_id = get_cat_ID($category); // Get a simple array of all posts under category $category_id $rawposts = get_posts(array('numberposts' => -1, 'category' => $category_id, 'order' => $this->options['sort_direction'])); // Trim some memory foreach ( $rawposts as $key => $rawpost ) $rawposts[$key]->post_content = $this->get_excerpt($rawposts[$key]->post_content, $this->options['post_content_max_len']); // Loop through each post and sort it into a structured array foreach( $rawposts as $key => $post ) { $posts[ mysql2date('Y', $post->post_date) ][ mysql2date('Y.m', $post->post_date) ][] = $post; $rawposts[$key] = null; } $rawposts = null; // More memory cleanup if($posts === null) { $posts = array(); } // Store the results into the WordPress transient, expires in 1 day (24 hours) set_transient(GRID_ARCHIVES_POSTS_TRANSIENT_KEY, $posts, 60*60*24); return $posts; } private function get_date_format($attr) { if($attr['month_date_format'] === 'default'){ $month_date_format = $this->options['month_date_format']; if($month_date_format === 'custom'){ $month_date_format = $this->options['month_date_format_custom']; } }else{ $month_date_format = $attr['month_date_format']; } if($attr['post_date_format'] === 'default'){ $post_date_format = $this->options['post_date_format']; if($post_date_format === 'custom'){ $post_date_format = $this->options['post_date_format_custom']; } }else{ $post_date_format = $attr['post_date_format']; } return array($month_date_format, $post_date_format); } private function compose_html_classic($posts, $monthly_summaries, $attr) { list($month_date_format, $post_date_format) = $this->get_date_format($attr); $html = '<div id="grid_archives" class="grid_archives_column">' . '<ul>'; foreach ($posts as $post_year => $yearly_posts) { foreach ($yearly_posts as $yearmonth => $monthly_posts) { list($year, $month) = explode('.', $yearmonth); $html .= '<li class="ga_year_month">' . '<a href="' . get_month_link( $year, $month ) . '" title="Monthly Archives: ' . $yearmonth . '">'. mysql2date($month_date_format, date('Y-m-d H:i:s', strtotime($year . '-' . $month))) . '</a>'; if(!empty($monthly_summaries[$yearmonth])){ $html .= '<span class="ga_monthly_summary">“' . $monthly_summaries[$yearmonth] . '”'; }else { $html .= '<span class="ga_monthly_summary">' . $this->options['default_monthly_summary']; } $html .= '</span></li>'; foreach ($monthly_posts as $post) { $html .= '<li class="ga_post">' . '<div class="ga_post_main">' . '<a href="' . get_permalink( $post->ID ) . '" title="' . $post->post_title . '">' . $this->get_excerpt($post->post_title, $this->options['post_title_max_len']) . '</a>' . '<p>' . $post->post_content . '</p>' . '</div>'; if(!$this->options['post_date_not_display']){ $html .= '<p class="ga_post_date">' . mysql2date($post_date_format, $post->post_date) . '</p>'; } $html .= '</li>'; } } } $html .= '</ul>' . '</div>'; return $html; } private function compose_html_compact($posts, $monthly_summaries, $attr) { list($month_date_format, $post_date_format) = $this->get_date_format($attr); $compact_month_list_date_format = $this->options['compact_month_list_date_format']; if($compact_month_list_date_format === 'custom'){ $compact_month_list_date_format = $this->options['compact_month_list_date_format_custom']; } $html = '<div id="grid_archives" class="grid_archives_column">'; $html .= '<ul class="ga_year_list">'; foreach ($posts as $year => $yearly_posts) { $html .= '<li><a href="' . get_year_link($year) . '" title="Archives of Year ' . $year . '">' . $year . '</a></li>'; } $html .= '</ul>'; foreach ($posts as $post_year => $yearly_posts) { $html .= '<div class="ga_pane">'; if(!$this->options['compact_hide_month_list']){ $html .= '<ul class="ga_month_list">'; $month_numbers = $this->get_months('numeric'); $month_range = $this->options['sort_direction'] === 'desc' ? range( 12, 1 ) : range( 1, 12 ); foreach ( $month_range as $i ) { $month_name = mysql2date($compact_month_list_date_format, date('Y-m-d H:i:s', strtotime($post_year . '-' . $month_numbers[$i]))); $month_post_count = count($yearly_posts[$post_year . '.' . $month_numbers[$i]]); if ($month_post_count > 0) { $html .= '<li class="ga_active_month"><a href="#' . $post_year . '_' . $month_numbers[$i] . '" title="' . $month_post_count . ' ' . ($month_post_count === 1 ? 'post' : 'posts') . '">' . $month_name . '</a></li>'; }else { $html .= '<li><span title="No post">' . $month_name . '</span></li>'; } } $html .= '</ul>'; } $html .= '<ul>'; foreach ($yearly_posts as $yearmonth => $monthly_posts) { list($year, $month) = explode('.', $yearmonth); $html .= '<li id="' . $year . '_' . $month . '" class="ga_year_month">' . '<a href="' . get_month_link( $year, $month ) . '" title="Monthly Archives: ' . $yearmonth . '">'. mysql2date($month_date_format, date('Y-m-d H:i:s', strtotime($year . '-' . $month))) . '</a>'; if(!empty($monthly_summaries[$yearmonth])){ $html .= '<span class="ga_monthly_summary">“' . $monthly_summaries[$yearmonth] . '”'; }else { $html .= '<span class="ga_monthly_summary">' . $this->options['default_monthly_summary']; } $html .= '</span></li>'; foreach ($monthly_posts as $post) { $html .= '<li class="ga_post">' . '<div class="ga_post_main">' . '<a href="' . get_permalink( $post->ID ) . '" title="' . $post->post_title . '">' . $this->get_excerpt($post->post_title, $this->options['post_title_max_len']) . '</a>' . '<p>' . $post->post_content . '</p>' . '</div>'; if(!$this->options['post_date_not_display']){ $html .= '<p class="ga_post_date">' . mysql2date($post_date_format, $post->post_date) . '</p>'; } $html .= '</li>'; } } $html .= '</ul></div>'; } $html .= '</div>'; return $html; } private function get_months( $format = 'long' ) { global $wp_locale; $months = array(); foreach ( range( 1, 12 ) as $i ) { if ( 'numeric' == $format ) { $months[$i] = zeroise( $i, 2 ); continue; } $month = $wp_locale->get_month( $i ); if ( 'short' == $format ) { $month = $wp_locale->get_month_abbrev( $month ); } $months[$i] = esc_html( $month ); } return $months; } private function get_excerpt($text, $length = 90) { if (!$length || mb_strlen($text, 'utf8') <= $length) return $text; $text = strip_tags($text); $text = preg_replace('/\(\(([^\)]*?)\)\)/', '(${1})', $text); $text = preg_replace('|\[(.+?)\](.+?\[/\\1\])?|s', '', $text); $text = mb_substr($text, 0, $length, 'utf8') . " ..."; return $text; } private function parse_summaries($str) { $summaries = array(); foreach (explode("\n", trim($str)) as $line) { if(strpos($line, '##') !== FALSE){ list($yearmonth, $summary) = array_map('trim', explode("##", $line, 2)); if (!empty($yearmonth)){ $summaries[$yearmonth] = stripslashes($summary); } } } return $summaries; } private function get_options() { $options = array('style_format' => 'classic', 'compact_hide_month_list' => false, 'compact_month_list_date_format' => 'F', 'compact_month_list_date_format_custom' => 'F', 'sort_direction' => 'desc', 'post_title_max_len' => 60, 'post_content_max_len' => 90, 'post_date_not_display' => false, 'post_date_format' => 'j M Y', 'post_date_format_custom' => 'j M Y', 'month_date_format' => 'Y.m', 'month_date_format_custom' => 'Y.m', 'post_hovered_highlight' => true, 'monthly_summary_hovered_rotate' => true, 'custom_css_styles' => '', 'load_resources_only_in_grid_archives_page' => false, 'grid_archives_page_names' => 'archives, grid-archives', 'default_monthly_summary' => '“... ...”', 'monthly_summaries' => "2010.09##It was AWESOME!\n2010.08##Anyone who has never made a mistake has never tried anything new."); $saved_options = get_option(GRID_ARCHIVES_OPTION_NAME); if (!empty($saved_options)) { foreach ($saved_options as $key => $option) $options[$key] = $option; } if ($saved_options != $options) { update_option(GRID_ARCHIVES_OPTION_NAME, $options); } return $options; } function handle_grid_archives_settings() { if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } $options = $this->get_options(); if (isset($_POST['submit'])) { check_admin_referer('grid-archives-nonce'); $orig_options = $options; $options = array(); $options['style_format'] = $_POST['style_format']; $options['compact_hide_month_list'] = isset($_POST['compact_hide_month_list']) ? (boolean)$_POST['compact_hide_month_list'] : false; $options['compact_month_list_date_format'] = $_POST['compact_month_list_date_format']; $options['compact_month_list_date_format_custom'] = stripslashes($_POST['compact_month_list_date_format_custom']); $options['sort_direction'] = $_POST['sort_direction']; $options['post_title_max_len'] = (int)$_POST['post_title_max_len']; $options['post_content_max_len'] = (int)$_POST['post_content_max_len']; $options['post_date_not_display'] = isset($_POST['post_date_not_display']) ? (boolean)$_POST['post_date_not_display'] : false; $options['post_date_format'] = $_POST['post_date_format']; $options['post_date_format_custom'] = stripslashes($_POST['post_date_format_custom']); $options['month_date_format'] = $_POST['month_date_format']; $options['month_date_format_custom'] = stripslashes($_POST['month_date_format_custom']); $options['post_hovered_highlight'] = isset($_POST['post_hovered_highlight']) ? (boolean)$_POST['post_hovered_highlight'] : false; $options['monthly_summary_hovered_rotate'] = isset($_POST['monthly_summary_hovered_rotate']) ? (boolean)$_POST['monthly_summary_hovered_rotate'] : false; $options['load_resources_only_in_grid_archives_page'] = isset($_POST['load_resources_only_in_grid_archives_page']) ? (boolean)$_POST['load_resources_only_in_grid_archives_page'] : false; $options['grid_archives_page_names'] = $options['load_resources_only_in_grid_archives_page'] ? stripslashes($_POST['grid_archives_page_names']) : $orig_options['grid_archives_page_names']; $options['custom_css_styles'] = stripslashes($_POST['custom_css_styles']); $options['default_monthly_summary'] = htmlspecialchars(stripslashes($_POST['default_monthly_summary'])); $options['monthly_summaries'] = htmlspecialchars(stripslashes($_POST['monthly_summaries'])); update_option(GRID_ARCHIVES_OPTION_NAME, $options); $this->delete_cache(); echo '<div class="updated" id="message"><p>Settings saved.</p></div>'; } include_once("grid-archives-options.php"); } private function get_style_format($style){ switch ($style) { case 'classic': case 'compact': break; case 'default': default: $style = $this->options['style_format']; break; } return $style; } function display_archives($atts){ extract( shortcode_atts( array( 'category' => 'General', 'style' => 'default', 'month_date_format' => 'default', 'post_date_format' => 'default' ), $atts ) ); $this->style = $this->get_style_format($style); $posts = $this->get_posts($category); $monthly_summaries = $this->parse_summaries($this->options['monthly_summaries']); return call_user_func(array($this, 'compose_html_' . $this->style), $posts, $monthly_summaries, array('month_date_format' => $month_date_format, 'post_date_format' => $post_date_format)); } function grid_archives_settings() { add_options_page('Grid Archives Settings', 'Grid Archives', 'manage_options', 'grid-archives-settings', array(&$this, 'handle_grid_archives_settings')); } private function load_extra_resources(){ if($this->options['load_resources_only_in_grid_archives_page']){ $load_extra = false; // if enabled, only load resources file (css, js etc) in those specific files foreach(array_map('trim', explode(",", $this->options['grid_archives_page_names'])) as $page_name){ $load_extra = is_page($page_name); if($load_extra) break; } }else{ // disabled, load $load_extra = true; } return $load_extra; } function load_styles(){ $this->options = $this->get_options(); if($this->load_extra_resources()){ $css_url = $this->plugin_url . '/grid-archives.css'; wp_register_style('grid_archives', $css_url, array(), GRID_ARCHIVES_VERSION, 'screen'); wp_enqueue_style('grid_archives'); if($this->options['post_hovered_highlight'] || $this->options['monthly_summary_hovered_rotate']) { $effect_css_url = $this->plugin_url . '/grid-archives-effect-css.php'; wp_register_style('grid_archives_effect', $effect_css_url, array(), GRID_ARCHIVES_VERSION, 'screen'); wp_enqueue_style('grid_archives_effect'); } $custom_css_styles = trim($this->options['custom_css_styles']); if(!empty($custom_css_styles)) { $custom_css_url = $this->plugin_url . '/grid-archives-custom-css.php'; wp_register_style('grid_archives_custom', $custom_css_url, array(), GRID_ARCHIVES_VERSION, 'screen'); wp_enqueue_style('grid_archives_custom'); } } } function load_scripts(){ if($this->load_extra_resources() && 'compact' === $this->style){ $jquery_tools_url = $this->plugin_url . '/jquery.tools.tabs.min.js'; wp_register_script('jquery.tools', $jquery_tools_url, 'jquery' , '1.2.5'); $js_url = $this->plugin_url . '/grid-archives.js'; wp_register_script('grid_archives', $js_url, array('jquery', 'jquery.tools') , GRID_ARCHIVES_VERSION); wp_print_scripts('grid_archives'); } } function load_admin_scripts(){ $admin_script_url = $this->plugin_url . '/grid-archives-options.js'; wp_register_script('grid_archives_admin_script', $admin_script_url, 'jquery', GRID_ARCHIVES_VERSION); wp_enqueue_script('grid_archives_admin_script'); } function delete_cache() { delete_transient(GRID_ARCHIVES_POSTS_TRANSIENT_KEY); } function install() { $this->options = $this->get_options(); } } } if (class_exists("GridArchives")) { $grid_archives = new GridArchives(); } ?>
  19. Hi I have a Wordpress setup and theme running nicely. I want to add a shop and Woocommerce has been recommended as the right way to go, so I've installed that nice and easy, but it doesn't work with my theme. I found this, http://wcdocs.woothemes.com/codex/third ... atibility/ I am trying to implement the hook. But I'm struggling as I find the instructions unclear. I'm sure this doesn't need any past knowledge of Woocommerce just of php. I've added the following to line 31 of the function.php file add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10); add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10); function my_theme_wrapper_start() { echo '<section id="maincontent">'; } function my_theme_wrapper_end() { echo '</section>'; } which to be honest is just area of the function.php with a gap. I've copied the function.php content into a Word doc linked to below. http://www.smarterbarcodes.co.uk/phpcontent.docx Any help on this would be great, Woo won't help until you have bought additional extensions, but if I can't get it to work, why should I?
  20. Hey everyone! So I have this code for wordpress that takes the featured image of a all the posts and displays the image and post title on one page. Then said image and post title links to that specific post. I'm very happy with how it functions right now, the only thing that I don't like right now is that it stacks above one another and I would like it to display in rows. Here is an example of it right now: http://blog-kora.marathonwebsites.com/ and here is my code: <?php global $post; $myposts = get_posts (); foreach( $myposts as $post ) : setup_postdata($post); ?> <h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('feat_image');?></a> <?php endforeach; ?> could anyone add code to my (preferably) php to help add columns? I really need help with it and I have no clue what to do
  21. I'm new to the site here, so I hope this is the right place for this post. It's also from a Wordpress site, but since Wordpress isn't the issue (and my [lack of] programming knowledge is), I figured this wouldn't fit on the Wordpress forums very well. So here's my problem. I downloaded a plugin which I'm trying to modify, and it's breaking my site (internal server error), which always makes for a fun day. Here's the piece I'm inserting: // ---START--- Add Buddypress 'Friends' filter. $wpdb->show_errors(); $k_user_id = $current_user->ID; $k_friends1 = $wpdb->get_col( "SELECT initiator_user_id FROM $wpdb->prefix . 'bp_friends' WHERE friends_user_id = $k_user_id AND is_confirmed = 1" ); $k_friends2 = $wpdb->get_col( "SELECT friends_user_id FROM $wpdb->prefix . 'bp_friends' WHERE initiator_user_id = $k_user_id AND is_confirmed = 1" ); $k_friends = array($k_friends1, $k_friends2); foreach($workers as $x) { if(!in_array($x, $k_friends, TRUE) { unset($workers[$x]); } } $wpdb->hide_errors(); The plugin has already defined the $workers variable, but I'd like to modify that variable by removing any values not contained in either of the two SQL queries. To provide more context, this plugin is an appointments plugin that I'm trying to integrate with Buddypress so that users can schedule appointments with each other, but only if they're friends. I know just enough php to get myself in trouble, so I'm sure there's something that's very obvious to everyone else, but I'm not seeing it...and it's very likely to do with me not understanding exactly how the functions are actually working. Any help would be very much appreciated. Thanks!
  22. Hi everyone, I would like to edit a file so that it only shows a image iif it is the home page on wordpress. <?php /* WARNING: This file is part of the core Genesis framework. DO NOT edit this file under any circumstances. Please do all modifications in the form of a child theme. */ /** * Handles the footer structure. * * This file is a core Genesis file and should not be edited. * * @category Genesis * @package Templates * @author StudioPress * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.studiopress.com/themes/genesis */ genesis_structural_wrap( 'inner', '</div><!-- end .wrap -->' ); echo '</div><div class="quote-table"><img src="http://clients2.weblink.com.au/clients/oceaniacapital/quotes_img.asp" alt="Quote Table" style="border: solid 1px #ddd;" /></div>'; do_action( 'genesis_before_footer' ); do_action( 'genesis_footer' ); do_action( 'genesis_after_footer' ); ?> </div><!-- end #wrap --> <?php wp_footer(); // we need this for plugins do_action( 'genesis_after' ); ?> This is what I only want to show on the home page. echo '</div><div class="quote-table"><img src="http://clients2.weblink.com.au/clients/oceaniacapital/quotes_img.asp" alt="Quote Table" style="border: solid 1px #ddd;" /></div>';
  23. Hello there. I'm a web designer trying to learn more development skills. I've written this opening hours widget for wordpress. Its functionality is very simple which is all I really need and it does the job, however I'd love to know how to make the code smaller as there are lots of thing repeating. I think parts of it could be done using a for each loop and arrays, but I can't figure out what way to do it. If anyone can help or point me in the right direction for what topic specifically to study I would be very grateful. Please see code below. Sorry if its really badly written, /** * Creating and displaying an Opening Times Widget */ wp_register_sidebar_widget( 'opening_times_widget', // your unique widget id 'Opening Times', // widget name 'opening_times_widget_display', // callback function to display widget array( // options 'description' => 'This widget displays your opening hours in your website sidebar' ) ); wp_register_widget_control( 'opening_times_widget', // id 'opening_times_widget', // name 'opening_times_widget_control' // callback function ); function opening_times_widget_control($args=array(), $params=array()) { //the form is submitted, save into database if (isset($_POST['submitted'])) { update_option('opening_times_widget_title', $_POST['widgettitle']); update_option('opening_times_widget_email', $_POST['widgetemail']); update_option('opening_times_widget_description', $_POST['description']); update_option('opening_times_widget_monday', $_POST['mondayhours']); update_option('opening_times_widget_tuesday', $_POST['tuesdayhours']); update_option('opening_times_widget_wednesday', $_POST['wednesdayhours']); update_option('opening_times_widget_thursday', $_POST['thursdayhours']); update_option('opening_times_widget_friday', $_POST['fridayhours']); update_option('opening_times_widget_saturday', $_POST['saturdayhours']); update_option('opening_times_widget_sunday', $_POST['sundayhours']); } //load options $widgettitle = get_option('opening_times_widget_title'); $widgetemail = get_option('opening_times_widget_email'); $description = get_option('opening_times_widget_description'); $mondayhours = get_option('opening_times_widget_monday'); $tuesdayhours = get_option('opening_times_widget_tuesday'); $wednesdayhours = get_option('opening_times_widget_wednesday'); $thursdayhours = get_option('opening_times_widget_thursday'); $fridayhours = get_option('opening_times_widget_friday'); $saturdayhours = get_option('opening_times_widget_saturday'); $sundayhours = get_option('opening_times_widget_sunday'); ?> Widget Title: ( eg: Opening Hours )<br /> <input type="text" class="widefat" name="widgettitle" value="<?php echo stripslashes($widgettitle); ?>" /> <br /><br /> Monday<br /> <input type="text" class="widefat" name="mondayhours" value="<?php echo stripslashes($mondayhours); ?>" /> <br /><br /> Tuesday<br /> <input type="text" class="widefat" name="tuesdayhours" value="<?php echo stripslashes($tuesdayhours); ?>" /> <br /><br /> Wednesday<br /> <input type="text" class="widefat" name="wednesdayhours" value="<?php echo stripslashes($wednesdayhours); ?>" /> <br /><br /> Thursday<br /> <input type="text" class="widefat" name="thursdayhours" value="<?php echo stripslashes($thursdayhours); ?>" /> <br /><br /> Friday<br /> <input type="text" class="widefat" name="fridayhours" value="<?php echo stripslashes($fridayhours); ?>" /> <br /><br /> Saturday<br /> <input type="text" class="widefat" name="saturdayhours" value="<?php echo stripslashes($saturdayhours); ?>" /> <br /><br /> Sunday<br /> <input type="text" class="widefat" name="sundayhours" value="<?php echo stripslashes($sundayhours); ?>" /> <br /><br /> Additional Information:<br /> <textarea class="widefat" rows="5" name="description"><?php echo stripslashes($description); ?></textarea> <br /><br /> Email Address:<br /> <input type="text" class="widefat" name="widgetemail" value="<?php echo stripslashes($widgetemail); ?>" /> <br /><br /> <input type="hidden" name="submitted" value="1" /> <?php } function opening_times_widget_display($args=array(), $params=array()) { //load options $widgettitle = get_option('opening_times_widget_title'); $description = get_option('opening_times_widget_description'); $widgetemail = get_option('opening_times_widget_email'); $mondayhours = get_option('opening_times_widget_monday'); $tuesdayhours = get_option('opening_times_widget_tuesday'); $wednesdayhours = get_option('opening_times_widget_wednesday'); $thursdayhours = get_option('opening_times_widget_thursday'); $fridayhours = get_option('opening_times_widget_friday'); $saturdayhours = get_option('opening_times_widget_saturday'); $sundayhours = get_option('opening_times_widget_sunday'); //widget output echo stripslashes($args['before_widget']); echo stripslashes($args['before_title']); echo stripslashes($widgettitle).'<span class="opening-hours-icon"> </span>'; echo stripslashes($args['after_title']); echo '<div class="textwidget">'; if ($mondayhours != '') { echo '<div class="opening-hours-day-info">Monday: <span>'.stripslashes($mondayhours).'</span></div>'; } if ($tuesdayhours != '') { echo '<div class="opening-hours-day-info">Tuesday: <span>'.stripslashes($tuesdayhours).'</span></div>'; } if ($wednesdayhours != '') { echo '<div class="opening-hours-day-info">Wednesday: <span>'.stripslashes($wednesdayhours).'</span></div>'; } if ($thursdayhours != '') { echo '<div class="opening-hours-day-info">Thursday: <span>'.stripslashes($thursdayhours).'</span></div>'; } if ($fridayhours != '') { echo '<div class="opening-hours-day-info">Friday: <span>'.stripslashes($fridayhours).'</span></div>'; } if ($saturdayhours != '') { echo '<div class="opening-hours-day-info">Saturday: <span>'.stripslashes($saturdayhours).'</span></div>'; } if ($sundayhours != '') { echo '<div class="opening-hours-day-info">Sunday: <span>'.stripslashes($sundayhours).'</span></div>'; } echo '<div class="opening-hours-description">'.stripslashes(nl2br($description)).'</div>'; if ($widgetemail != '') { echo '<div class="opening-hours-email"><a href="mailto:'.stripslashes($widgetemail).'" target="_blank">Email us</a> to arrange an appointment</div>'; } echo '</div>';//close div.textwidget echo stripslashes($args['after_widget']); }
  24. Hi, I want to scrolling down all posts in homepage. I have installed this plugin http://wordpress.org/extend/plugins/infinite-scroll/. But i could't configure the CSS settings in the infinite-scroll setting for my theme. Here is my site http://www.adventureseeker.org/ Need help. Thanks in advance. Regards.
  25. I've begged people all over the web for help with this problem. It's hard to explain because people read about it, and they think I just don't know how to execute simple navigation on WordPress. Let me try to explain: I have a website run by WordPress. I need to edit the home page. When I click Pages-->All Pages-->Home which is linked to home, it's empty. When I go to Apperence-->Editor-->Front Page Page Template it gives me PHP code to dictate basic template stuff, it won't let me edit As you can see from the site, I have things other than the featured items and so on, like the "Bridgett Provenzano" letter at the bottom. But on my supposed home page there is nothing, on my specific theme settings, I have the featured items written out and I have the PHP code for the temlpate but none of that lets me edit the stuff on the front that I need to edit, namley the stuff under the featured items. I hired someone but I don't have any money in the budget to do that again. He somehow added some text into the front page even though I see no way to do so, and cant see where he added it when I look at the code. I'm at a loss. I'm going nuts here trying to figure this out. I don't know PHP, it looks as confusing as hell.
×
×
  • 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.