Search Results

Search found 7677 results on 308 pages for 'wordpress shopping cart plugins'.

Page 100/308 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Easy way to combine php code (lame question)

    - by alekseygr
    Hi, I have vary easy and LAME question. I have code: <?php if (function_exists("insert_audio_player")) {insert_audio_player("[audio:|titles=]"} ?> This code outputs audio player to my page in wordpress. I need to call custom field inside this code. My custom field code is: <?php print_custom_field('tc_filename'); ?> Something like: <?php if (function_exists("insert_audio_player")) {insert_audio_player("[audio:<?php print_custom_field('tc_filename'); ?>|titles=<?php print_custom_field('tc_title'); ?>]"} ?> How can I call for second code inside first? Thx.

    Read the article

  • The way to send duplicate email to the user?

    - by Josephine
    I made simple email in wordpress but it would only send email to the administrator email. I need to find the way to send duplicate email with Thanks to the user. $emailTo = get_option('tz_email'); if (!isset($emailTo) || ($emailTo == '') ){ $emailTo = get_option('admin_email'); } $subject = 'I Have A Question to Ask from '.$name; $body = "Name: $name \n\nEmail: $email \n\nPhone: $phone \n\nComments: $comments"; $headers = 'From: '.$name.' ' . "\r\n" . 'Reply-To: ' . $email; wp_mail($emailTo, $subject, $body, $headers); $emailSent = true; } Insight is appreciated. Thank you.

    Read the article

  • Admin now missing from Authors dropdown

    - by Driss Zouak
    I've been running my Wordpress install for months with 2 users, the original administrator which I use and another admin account created for my co-admin. We've been posting fine, no issues, all was great. Two days ago I created another user, and now whenever I log in as the original admin (my account) I am no longer in the authors dropdown list. Any new users I create show up, but my original account is no longer listed. I can't figure out what's going on, nor how to restore myself.

    Read the article

  • How save JavaScript and HTML in option without it being auto-escaped?

    - by bobsoap
    And there I thought I knew Wordpress well. It now seems that update_option() auto-escapes code. If I want to save some Javascript or HTML code in an option, this behavior renders the code unusable. I refuse to do a str_replace on the returned value to filter out every backslash. There has to be a better way. Here's the PHP for the text box to enter some code: $option = unserialize(get_option('option')); <textarea name="option[box]"><?php echo $option['box']; ?></textarea> This is what happens after submitting the form (in essence): update_option('option', serialize($_POST)); Any ideas?

    Read the article

  • How to learn web-programming (Javascript, PHP)?

    - by metal-gear-solid
    If I'm going to learn programming first time, How i should start? I don't know programming yet but I'm good at XHTML and CSS. my main aim is to learn first Javascript than second PHP. after having good command in Javascript I'll move to PHP. all these i want to learn to get good command in all areas of Wordpress design and Development. Although i can use basic javascript, jquery, PHP scripts in my projects but know i want to learn programming concept and want to get good knowledge.

    Read the article

  • Display username to logged in user only?

    - by RodeoRamsey
    I have a Wordpress blog set up to display comments as "Anonymous User" by hard coding it into the comments.php file. I would like to have it say the user's Username next to their comment and ONLY display that Username to THEM. In other words, if they're a guest, they'll see "Anonymous User" and if they're a registered/logged in DIFFERENT user, they'll still see "Anonymous User", but if it's THEIR comment it'll say "Your Comment" or their own username. Any clue on a snippet of code? Here's what I have so far: Anonymous User: <div class="post-txt" id="<?php comment_ID() ?>"><?php comment_text() ?></div> Thanks!

    Read the article

  • PHP: Iterate through folders and display HTML contends

    - by Mestika
    Hi, I’m currently trying to develop a method to get a overview of all my different web templates I’ve created and (legally) downloaded over the years. I thought about a displaying them like Wordpress is previewing it’s templates view a small preview windows, displaying the concrete file with styles and everything. How to divide them into rows and columns and create AJAX modal window open on preview and pagination and so on I believe I can manage, but it is the concept itself about iterate over several folders then find all index.htm / index.html pages and displaying them. I’ve not worked very much with directories in PHP and the only references and code stumps I’ve found so far is just to list all the files in a certain directory like, what it contains. I would be really grateful if someone knew about a script, a function, snippet or just could get me a nudge in the right direction to create such a (probably simple) preview function. Sincere Mestika

    Read the article

  • .htaccess setting is not working on Google Chrome

    - by Zack
    I am using CakePHP framework, it redirect everything to the app folder using .htaccess, and then I set up a WordPress blog in /news/ folder outside of CakePHP, so I don't want everything in /news/ to be redirect, so I modify the .htaccess, and here is the final version: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/news/(.*)$ RewriteRule ^.*$ - [L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> It's working fine in IE and FireFox, I can visit mydomain/news/, but in Google Chrome, it still redirects to CakePHP app folder. How can I fix this?

    Read the article

  • Overlapping divs, absolutely relative?

    - by askon
    A wordpress theme I'm working on has headlines which span across the entire content area. These headlines are overlapped by the sidebar which is absolutely positioned at 100% width. The issue, is when the sidebar's content exceeds the page's content, it stretches OUT of my wrapper overtop of the footer without forcing the it down (because it's absolute and nothing else is). So my question is, how would it be possible to make a absolutely positioned div, become relative and essentially "push" my footer down, or is there a better way to do this? Also, if anyone has examples of how this has been done would be awesome! edit: The sidebar is absolutely positioned so it can lay over top of the sidebar. I don't have an online example as I'm doing doing a local server set-up, everything else is relatively position, and likely floated. Image Example: http://imagecheese.com/gallery/stackquest.png

    Read the article

  • Google Adword not working /conversion.js not found

    - by Jed
    I'm currently working on a wordpress site. My task is just to add the conversion script in a thankyou page. I added the script here: http://www.livingedge.co.nz/thanks-for-getting-in-touch/ , unfortunately does not work. It says that a conversion.js was not found. See the attached screenshot: http://screencast.com/t/52ixQUzHKNxZ I added the conversion script on the footer put it in a conditional so that it will load only on the thakyoupage. I'm new to this and can't figure out what would be the possible cause of such problem. I tried adding the script in the header, on the page editor, on a form redirect. Q: What could be the possible cause of this issue?

    Read the article

  • Make the footer stick at the bottom of the page

    - by TheConscience
    Here is the site (made in Wordpress): http://miladalami.com I want to have the footer stick at the bottom of the page. Any solutions in how I do this? I have already tried cssstickyfooter.com and xs4all.nl/~peterned/examples/csslayout1.html but none worked as I wanted. What happened was that the main body of the page overlapsed the footer. I have been wrapping my head around this the past two days and Im lost. Is there anyone that can solve this puzzle?

    Read the article

  • wp e-commerce php modification

    - by user1015687
    Here are a few lines of code from a wordpress plugin (WP E-commerce) that calculate the price. Now what i want is that if 'cart_item' are more than 3 in quantity then the price should be (number of items * 4) else the function should work as it is listed below. Thnks for help. function calculate_subtotal($for_shipping = false) { 1047 global $wpdb; 1048 if($for_shipping == true ) { 1049 $total = 0; 1050 foreach($this->cart_items as $key => $cart_item) { 1051 if($cart_item->uses_shipping == 1) { 1052 $total += $cart_item->total_price; 1053 } 1054 } 1055 } else { 1056 $total = 0; 1057 if($this->subtotal == null) { 1058 foreach($this->cart_items as $key => $cart_item) { 1059 $total += $cart_item->total_price; 1060 } 1061 $this->subtotal = $total; 1062 } else { 1063 $total = $this->subtotal; 1064 } 1065 } 1066 return $total; 1067 }

    Read the article

  • Add the categories selector widget to the PAGE editor with predefined categories listed?

    - by Scott B
    The following code will add the categories selector widget to the WordPress Page editor interface... add_action('admin_menu', 'my_post_categories_meta_box'); function my_post_categories_meta_box() { add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'page', 'side', 'core'); } What I would like to do is to figure out how to modify the resulting category listing so that it only contains a predefined list of hard coded categories that I define. Since I'm adding this via my custom theme, it will only appear on the page editor when my theme is active on the site. And I have some specific "handler" categories that my theme installs into the site and later uses to determine layout elements.

    Read the article

  • Redirect to hash URL

    - by r1987
    I'm building a site with a hashchange on wordpress, all working good. It just loads a single.php template file into a div. The problem is that i can still access my single url (http://www.mydomain.com/my-single-post). Since its not having any head and style tags with it, i don't want people to go over there. Also google has picked up the direct links, because I use the href attribute to load content into the div. So my question is: If someone clicks a link lets say in a forum, http://www.mydomain.com/my-single-post , is it possible to redirect him instantly to http://www.mydomain.com/#my-single-post ? I have researched that it has something to do with .htaccess, but I also have Pages, where i don't want the hash infront of the page-name.

    Read the article

  • CSS: can change height by px, but not by %

    - by cag8f
    I am trying to edit the CSS of my Wordpress theme. I have an element whose height I can successfully change from within Element Inspector, if I specify a certain pixel height, e.g. height=100px; But when I try to change the height by specifying a percentage, e.g. height=50%; the element does not change height. Any thoughts on what I'm doing wrong, or how to troubleshoot? None of the parent elements appear to have any height properties.

    Read the article

  • Vim: Use different ~/.vim/plugin/ directories for different versions of vim?

    - by Stefan Lasiewski
    Like many of you, my custom Vim configuration is stored in my ~/.vimrc, with the plugins, colors, etc. stored under ~/.vim/plugins, ~/.vim/colors, etc. I want to share a single Vim configuration among many servers. Some of these servers run Vim 7, some run the older Vim 6. Most Vim plugins are intended for Vim 7, but older versions still exist for those of us on older systems. See DirDiff for an example. If I am on a system which runs Vim 6, how can I configure Vim to only use Vim 6-compatible plugins? I was thinking about storing older plugins in a subdirectory like ~/.vim/plugins6/ and keep the Vim plugins in ~/.vim/plugins, but then how can I tell Vim6 to ignore ~/.vim/plugins and use ~/.vim/plugins6 instead?

    Read the article

  • NGinx Best Practices

    - by The Pixel Developer
    What best practices do you use while using NGinx? try_files in Subdirectory Credits go to Igor for helping me with this one. location /wordpress { try_files $uri $uri/ @wordpress; } location @wordpress { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(/wordpress)(/.*)$; fastcgi_param SCRIPT_FILENAME /var/www/wordpress/index.php; fastcgi_param PATH_INFO $fastcgi_path_info; } Normally PATH_INFO would include the "/wordpress", so we use the "split_path_info" command to grab the part of the URI after "/wordpress". This allows us to wordpress with and without the index.php file.

    Read the article

  • jquery ajax call from link loaded with ajax

    - by Jay
    //deep linking $("document").ready(function(){ contM = $('#main-content'); contS = $('#second-content'); $(contM).hide(); $(contM).addClass('hidden'); $(contS).hide(); $(contS).addClass('hidden'); function loadURL(URL) { //console.log("loadURL: " + URL); $.ajax({ url: URL, type: "POST", dataType: 'html', data: {post_loader: 1}, success: function(data){ $(contM).html(data); $(contM).animW(); } }); } // Event handlers $.address.init(function(event) { //console.log("init: " + $('[rel=address:' + event.value + ']').attr('href')); }).change(function(event) { $.ajax({ url: $('[rel=address:' + event.value + ']').attr('href'), type: "POST", dataType: 'html', data: {post_loader: 1}, success: function(data){ $(contM).html(data); $(contM).animW(); }}); //console.log("change"); }) $('.update-main a').live('click', function(){ loadURL($(this).attr('href')); }); $(".update-second a").live('click', function() { var link = $(this); $.ajax({ url: link.attr("href"), dataType: 'html', data: {post_loader: 1}, success: function(data){ $(contS).html(data); $(contS).animW(); }}); }); }); I'm using jquery and the 'addresses' plugin to load content with ajax and maintain pagination. The problem I'm having is some content loads with links which are intended to load content into a secondary window. I'm using the .live() method to allow jquery to listen for new links loaded into the primary content div. This works until the .ajax() method is called for these fresh links loaded with ajax, where the method begins, but follows the original link before data can be received. I'm assuming the problem is in the client-side scripting, but it may be a problem with the call made to the server. I'm using the wordpress loop to parse the url and generate the html loaded via jquery. Thanks for any tips!

    Read the article

  • Hooking into comment_text() to add surrounding tag

    - by Stefan Glase
    Trying to hook into the function comment_text() supplied by Wordpress API to wrap the output of every comment into a <div>...</div> container I am running into the following problem: Without my added filter the output of comment_text() looks like this: <p>Hello User!</p> <p>Thank you for your comment.</p> <p>Stefan</p> Thats fine but as I said I would like to have it wrapped into a <div class="comment-text">...</div>. As far as I know the correct way doing this would be in adding a filter to functions.php of my theme and so I did: function stefan_wrap_comment_text($content) { return "<div class=\"comment-text\">". $content ."</div>"; } add_filter('comment_text', 'stefan_wrap_comment_text'); As I can see from the output the given filter works but it has a negative sideeffect to the first paragraph of the content as you can see in the following example. The first paragraph should be <p>Hello User!</p> but looks like this: Hello User!. <div class="comment-text"> Hello User! <p>Thank you for your comment.</p> <p>Stefan</p> </div> Any ideas or hints what I am doing wrong?

    Read the article

  • Relative Footer with Absolute DIV Elements

    - by Alex
    Hi, I'm creating a wordpress theme where the header and the nav bar are positioned absolutely, and the footer needs to be positioned relatively depending on the height of the content on each page. When I try to set the footer's positioning to relative, however, it appears at the top of the page underneath the content. All elements are in a relatively positioned container. Is there any way to fix this, or to dynamically get the height of the content plus the header and nav bar? The structure of the page is as follows: <div id="container"> <div id="header"> </div> <div id="navbar"> </div> <div id="content"> Dynamically generated and variable height content here. </div> <div id="footer"> </div> </div> And the relevant css is: #container { position: relative; margin:0px auto; width: 945px; text-align: left; } #header, #navbar{ background-color: #FFFFFF; position: absolute; margin-right: auto; margin-left: auto; width: 945px; float: left; } #footer { height: 35px; margin-right: auto; margin-left: auto; width: 945px; position: relative; padding-top: 20px } Thanks for the help.

    Read the article

  • How do I underline parent menu item but not children?

    - by Steven
    Using Wordpress menu "builder", I get the following code: //Pseaudo code <ul id="main-menu-main"> <li class="menu-item"><a></a></li> <li class="menu-item current-menu-ancestor"> <a></a> <ul class="sub-menu"> <li class="menu-item"><a></a></li> <li class="menu-item current-menu-item"><a></a></li> </ul> </li> </ul> // and I use the following CSS #menu-main-menu a:hover { text-decoration: underline; } #menu-main-menu .current-menu-ancestor a { text-decoration: underline; } The problem with my last css line, is that all a elements under current-menu-ancestor are underlined. I only want the link in current-menu-ancestor to be underlined. I think this should be pretty simple, but right now my head is not focused :-/ The full code for parent / child looks like this: <ul id="menu-main-menu" class="menu"> <li id="menu-item-401" class="menu-item-first menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-401"> <a>menu 1</a> <ul class="sub-menu"> <li id="menu-item-444" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-415 current_page_item menu-item-444"> <a> sub 1</a> </li> </ul> </li>

    Read the article

  • Submit information to url, but also open PDF

    - by Mad Ducky Digital Branding
    I have a client whose desire is to have her Wordpress blog show a MailChimp form on her home page as a gateway to a .pdf. I need the following behavior to occur when the user clicks "Submit": execute the included MailChimp's javascript file; this ensures the form was properly filled, and then performs the sign-up to the newsletter list (don't need help with this part) then show the user an informational PDF for download or viewing EDIT: The logical order was flipped from when I originally posted this. The script should execute, and only if the script gets executed properly should the PDF show to the user Note: My experience level with HTML and PHP is 3/4, and with JS I am 2/4 EDIT: (seems more like 1/4 at this point lol). If my research is correct, PHP (server-side language) would be used to do that which the client wants. Additional validation is not necessary beyond what MailChimp's script provides (it ensures that user has submitted a completed form) is not necessary in this case (the client says it's ok if the e-mail isn't valid at all). EDIT: Reworded this sentence from original post to be more clear The .pdf URL and content is static, and simply needs to be shown, not generated. ----RESEARCH---- I know that the Mailchimp form uses the following line to actually submit the information, but I want to do the action mentioned below, as well as open the aforementioned .pdf: <form action="http://*BLAH*.us2.list-manage.com/subscribe/post?u=*BLAHBLAH*&amp;id=*BLAHBLAHBLAH*" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank"> I am reading on other sites that I can conceivably point "action" to a .php file, but if there is a way to do this with javascript - since its using the .js file that I created for that already anyways, then I would be most happy. Barring that, I'll take what I can get.. ----SOLUTION?---- ...

    Read the article

  • semi dynamic cdn

    - by dwi kristianto
    i'm developing couple of websites using php (directory script, etc.) and wordpress as cms. i need to improve its performance, by using cdn for static files (css, js, images). the problem is, css and javascript files are generated on the fly. i did that due to yahoo and some expert advice to combine the files into one file. also changing basic color of css files. for the time being, i use couple of small vps but still its not fast enough. i already contact maxcdn and the support guy said that they dont have such kind of services. what i need is: a cdn that will serve the request from user/visitor and there's no file in local disk, the cdn will redirect/fetch it from another domain/server. in vps, it could be done easily using combination of .htaccess and php, but NOT in the cdn. most of cdn only support purely static files. is there any such cdn that will server semi-dynamic files?

    Read the article

  • What is the best way to do testing database (MYSQL spesific)

    - by justjoe
    Right now i'm on testing something in a database. It's a wordpress database. i have to write and delete and do other operation on it. As you know it, it has indexing mechanism that will always make every new post inherit the next highest possible ID. Please consider that this database is a copying of used database. it has been written before. So, i will need to make sure when i finish my testing, it will be the same Right now, my only solution is making backup. So if i have end in some section of planned testing, i will backup it and start next testing on another copy of it. Fortunately, the size of database is only a small one. so delete and copy and backup it will be easy. but i know this way of database testing is only partial solution.It force me to create too many backup copy. I don't know what i will do if the database has bigger size. it will be a very long of testing nightmare. so i wonder is there any solution that work just like rollback. So it will just lock the database and just put new entry as some kind of cache. I can erase it or write it into the database. i use mysql and phpmyadmin and use it to developed some custom solution. EDIT ::: How to effectively doing testing on database when developing PHP solution ?

    Read the article

  • Help with php code - need to add condition to make one link https

    - by Kaskade
    Hi, I have a wordpress blog and I need to make one of the pages secure. I have been told to make the link to that page point to https://claimpage.html as opposed to http://claimpage.html. The problem is I don't actually create the menu that links the user to the individual pages. This is done automatically by the code in the background. I think I need to put in some sort of an IF statement, saying, if the title of the page is "claim now" then use https otherwise use http. I found this code in the header.php so I think my changes need to go in here but I'm not really sure what to do. <div id="navbar"> <ul class="menu"> <li class="<?php if ( is_home() ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>"><?php _e('Home'); ?></a></li> <?php wp_list_pages('sort_column=id&depth=1&title_li='); ?> <?php wp_register('<li>','</li>'); ?> </ul> </div> <!-- end of #navbar --> Any suggestions as to how I can make one page that I know the title and url or https while the others are kept using normal http? The site is hosted on a secure server so I do have an ssl certificate.

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >