Search Results

Search found 6701 results on 269 pages for 'wordpress plugins'.

Page 11/269 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Filtering custom fields on wordpress admin page

    - by Kyril
    I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom fields that will later be read from the template. The plugin adds an additional meta box to the "Edit Post" screen which is responsible for manipulating these values. My problem is that the custom fields generated by the plugin also show up in the "Custom Fields" box. Ideally I would like for the custom fields generated by the plugin to be managed separately from any other custom fields for that same post/page. Is there a way that I can filter fields specific to my plugin to prevent them from being displayed in the "Custom Fields" box? I have yet to locate any action or filter that will let me capture and manipulate those values before they are rendered on "Edit Post".

    Read the article

  • Wordpress Post order

    - by kwek-kwek
    I wanted to re-arrange my post in wordpress so they go Ascending/Descending. Here is my code: <ul> <?php $postslist = get_posts('cat=3,4,5,numberposts=5&order=DESC&orderby=date'); foreach ($postslist as $post) : setup_postdata($post); ?> <li> <span class="date"><?php the_time('M j') ?></span> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li> <?php endforeach; ?> </ul> Each post is pulled from different categories.

    Read the article

  • Wordpress comments - perform simple math?

    - by RodeoRamsey
    I have a Wordpress website in which one of the categories I've stripped the comments field down to basic whole numbers only. The logged in user can enter data on the post via the "comments" field, in basic simple whole numbers. Is there any way to take the MOST RECENT comment on all posts from that category (cat 1) and run basic math? My goal is to take the most recent comment's input from each post and add it together and display it via some php/html on another page/post or widget somewhere. Thanks!

    Read the article

  • Problem with images in upload directory after upgrading WordPress to 3.0

    - by Volmar
    I've developed a WordPress plugin and it wordked well from WP 2.0 and up to WP 3.0rc1 (haven't tried rc2) but now with rc3 and milestone 3.0 a strange and irritating error appeared. If you check out my demo page you will se that none of the cover-images is working. they are in the same place as before but they can not be hotlinked or show up when i enter the correct url. if i move the img-directory from /wp-content/uploads/my-record-collection/ to /wp-content/uploads/ the images show up if i enter the url, but not if i move it back inside my "my-record-collection"-folder. anyone know what change in rc3(or maybe rc2) that made this bug appear and what can be done to fix it?

    Read the article

  • jQuery slider not working in Wordpress plugin

    - by Matt Facer
    I've written a plugin for wordpress and I want to use a slider on my page. In it's most basic form (now) to test, I have the for the slider on my page <div id="wpge-slider"></div> then in the plugin, I have my init action add_action('init', 'wpge_init' ); function wpge_init() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('wpge_search_results', get_bloginfo('wpurl') . '/wp-content/plugins/myplugintest/js/wpge_search_results.js', array('jquery'), '1.0'); } then in my own javascript page, I have jQuery(document).ready(function($) { $("#wpge-slider").slider(); }); Everything (to me) looks ok, and the scripts ARE being called in the header. I can see them on the page... yet the slider is not showing. Can anyone see where I'm going wrong?!

    Read the article

  • Building a "lecture notes" website with wordpress

    - by Tal Galili
    Hi all, I wish to build a "lecture notes" website using wordpress. And would love for any advice on what plugins to use, other considerations to have or website that perform a similar task with WP. The website should have a form that will allow users to upload their lecture files. The results should be a new "post". When submitting the form, the users should be able to tag their subject matter so to allow others to search it. Any suggestions will be welcomed. Thanks.

    Read the article

  • wordpress path url in js script file

    - by Cam
    I added custom script wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false); works great, except in the functions.js i have Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left"; now this used to work before, until changed to pretty permalinks and .htaccess the folder hierarchy is like: themename/js themename/images (the images and js folder are in themename folder) i tried ../images - ./image - /images normally it should go back 1 level where-ever the js file is located.... i dont want to use full path is there a other way that wordpress can recognize in the javascript file to have the correct path? currently i am just confused what i am doing wrong

    Read the article

  • [WordPress 3.1.3] Sreen option is disabled when a plugin is activated

    - by RNorbe
    I'm pretty new to wordpress. I was assigned to create a custom plugin for one of our projects here. The plugin worked as expected and there is no problem activating/deactivating it. When I was exploring the admin panel I noticed that the screen option is off. I read from a blog somewhere that deactivating the plugin one by one to check which plugin has caused this. I did just this and found out that the custom plugin I created was the cause. My question is, is there way to check what have caused this? Some log file I can look into? There is no error message or warning when I activated the plugin and it is giving the output required. This is my first plugin, any advice will be helpful. Btw, this plugin will display a comment (most recent will be shown first) in a widget and there is prev/next navigation to go through the rest of the comments. Thanks, RNorbe

    Read the article

  • Installing sublime text plugins all at once

    - by James
    Is there a way to install all the sublime text 2 plugins that you would like to install all at once. In Notepad++, there is a plugin manager which lets you install all the plugins you want to install by checking the box next to the plugin name & description. I was wandering if there is something like that for sublime text. For eg, I would like to install Zen Coding, JQuery Package for Sublime Text, Sublime Prefixr, JS Format, SublimeLinter and many other plugins all at once rather than typing each plugin in the Package Control and installing it one by one.

    Read the article

  • Performance improvements of VBulletin by integrating the plugins

    - by reggie
    I have amassed quite a lot of plugins and code that is being hooked into VBulletin's plugin system. There are good uses for this system. But since I am now locked in with the VB 3 branch and it is no longer updated, I wonder what kind of performance improvements I would see if I integrated all the plugins into the vbulletin files and turned the plugin system completely off. My site has about 1.5 mio posts, about 100,000 threads, 100,000 members (of which 10,000 are "active"). I estimate I have about 200 plugins from different products in the plugin manager. Has anybody ever tried this move and could share the experiences?

    Read the article

  • Wordpress SQL Select Multiple Meta Values / Meta Keys / Custom Fields

    - by Wes
    I am trying to modify a wordpress / MySQL function to display a little more information. I'm currently running the following query that selects the post, joins the 'postmeta' and gets the info where the meta_key = _liked function most_liked_posts($numberOf, $before, $after, $show_count) { global $wpdb; $request = "SELECT ID, post_title, meta_value FROM $wpdb->posts, $wpdb->postmeta"; $request .= " WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id"; $request .= " AND post_status='publish' AND post_type='post' AND meta_key='_liked' "; $request .= " ORDER BY $wpdb->postmeta.meta_value+0 DESC LIMIT $numberOf"; $posts = $wpdb->get_results($request); foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $permalink = get_permalink($post->ID); $post_count = $post->meta_value; echo $before.'<a href="' . $permalink . '" title="' . $post_title.'" rel="nofollow">' . $post_title . '</a>'; echo $show_count == '1' ? ' ('.$post_count.')' : ''; echo $after; } } The important part being: $post_count = $post->meta_value; But now I want to also grab a value that is attached to each post called wbphoto How do I specify that $post_count = _liked and $photo = wbphoto ? Here is a screen cap of my Phpmyadmin

    Read the article

  • Wordpress "Vote It Up" plugin help

    - by Sparks Memphis
    I'm creating a dig like site with wordpress, TDO Mini forms and Vote it up where people who live in the city can log on, post their ideas of how to improve the city and have others vote. on the home page there are 2 columns. right is the TDO submit form. left are the "Most Wanted" items. the posts with the highest rating. I've found an impressive lack of information on this plugin. im not great with php but i can make do most of the time. I want to output the post title, post author, links for yes and no votes as well as have the titles in the left column list in most popular order. preferably id like the home pages to have only the top 5 or so highest rated posts. I cant find any way to output that information as i need. I was really hoping there was a simple way to call the highest rated post titles in the loop for the main page but there doesnt seem to be a way. Bout the only thing i've found is the DisplayVotes tag which isnt incredibly helpful. does anybody know how i can accomplish this, or can provide some expert advise? help would be immensely appreciated.

    Read the article

  • Wordpress Event list

    - by kwek-kwek
    Hi I have followed a tutorial to create and event list in wordpress using post and Custom Fields view demo here is my code: <?php // Get today's date in the right format $todaysDate = date('M d'); ?> <?php query_posts('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC'); ?> <ul> <?php if (have_posts()) : while (have_posts()) : the_post(); $eventMeta = get_post_meta($post->ID, 'Date', true); $eventDate = strtotime($eventMeta); $displayDate = date ('M d', $eventDate);?> <li> <span class="date"><?php echo $displayDate ; ?></span> <span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> </li> <?php endwhile; else: ?> <li>Sorry, no upcoming events!</li> <?php endif; ?> </ul> <?php wp_reset_query(); ?> Now my problem is that it doesn't show any events for the future events e.g. (June, July etc. ...). On one of the the discussion there someone had said about putting "In your query_posts, just use the parameter ‘post_status=future’ ". Can you please let me know exactly where? I have added it but nothing happened.

    Read the article

  • WordPress plugin to output a certain category on content page tweak help

    - by talkingD0G
    I'm using WordPress plugin Category Page to display the most recent 5 posts from a certain category on a regular content page (not the blog page) of a website. Right now the plugin is limited to display the post title linked to the post page. This is a video blog type site and I need the plugin to display the post title (as it does now) with the video as well. Probably just telling the script to show the content would work but I don't know how to tweak it. This is the section of the script that is outputting the post title: function page2cat_content_catlist($content){ global $post; if ( stristr( $content, '[catlist' )) { $search = "@(?:<p>)*\s*\[catlist\s*=\s*(\w+|^\+)\]\s*(?:</p>)*@i"; if (preg_match_all($search, $content, $matches)) { if (is_array($matches)) { $title = get_option('p2c_catlist_title'); if($title != "") $output = "<h4>".$title."</h4>"; else $output = ""; $output .= "<ul class='p2c_catlist'>"; $limit = get_option('p2c_catlist_limit'); foreach ($matches[1] as $key =>$v0) { $catposts = get_posts('category='.$v0."&numberposts=".$limit); foreach($catposts as $single): $output .= "<li><a href='".get_permalink($single->ID)." '>".$single->post_title."</a></li>"; endforeach; $search = $matches[0][$key]; $replace= $output; $content= str_replace ($search, $replace, $content); } $output .= "</ul>"; } } } return $content; } If anyone has any advice or knows how to help thanks in advance!

    Read the article

  • Wordpress post showing in my Home page

    - by kwek-kwek
    I am setting up an eventlist for wordpress here is my code: <?php $todaysDate = date ('M d'); $event_query = query_posts('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); $eventMeta = get_post_meta($post->ID, 'Date', true); $eventDate = strtotime($eventMeta); $displayDate = date ('M d', $eventDate); ?> <li> <span class="date"><?php echo $displayDate ; ?></span> <span><a href="<?php the_permalink();?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span></li> <?php endwhile; else:?> <li>No Upcoming events</li> <?php endif;?> Now the problem is that the post shows under my home content and when you click on the post under "nouvelles" it goes to a different entry. view the site

    Read the article

  • Wordpress OptimizePress (Theme) error when creating new page

    - by user594777
    I just installed WordPress newest version, also installed OptimizePress Theme. I am getting the following error when trying to add a new page in Word Press. Any help would be appreciated. Warning: mkdir() [function.mkdir]: Permission denied in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clscustomfields.php on line 1578 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clscustomfields.php on line 1581 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clscustomfields.php on line 1584 Warning: mkdir() [function.mkdir]: Permission denied in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clsblogfields.php on line 174 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clsblogfields.php on line 177 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clsblogfields.php on line 180 Warning: mkdir() [function.mkdir]: Permission denied in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clslpcustomfields.php on line 1725 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clslpcustomfields.php on line 1728 Warning: mkdir() [function.mkdir]: No such file or directory in /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clslpcustomfields.php on line 1731 Warning: Cannot modify header information - headers already sent by (output started at /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clscustomfields.php:1578) in /home/admin/domains/mywebsite.com/public_html/wp-includes/functions.php on line 830 Warning: Cannot modify header information - headers already sent by (output started at /home/admin/domains/mywebsite.com/public_html/wp-content/themes/OptimizePress/admin/clscustomfields.php:1578) in /home/admin/domains/mywebsite.com/public_html/wp-includes/functions.php on line 831

    Read the article

  • Wordpress Admin Panel Code Input

    - by Wes
    I've got a wordpress admin panel for one of my themes and one of the boxes has an input for some code to drive google adsense. when I put the code into the box and call it with my php tags the code comes out like this: <script type="\&quot;text/javascript\&quot;"><!-- google_ad_client = \"pub-9295546347478163\"; /* Leaderboard 5/17/2010 */ google_ad_slot = \"7593465074\"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="\&quot;text/javascript\&quot;" src="%5C%22http://pagead2.googlesyndication.com/pagead/show_ads.js%5C%22"> </script> Which I assume is a feature to stop SQL injections. How can I call pure code form a box? This is how I currently have that textbox setup. array( "name" => "Code for Top ad", "desc" => "Enter the HTML that will drive the banner ad for the page header", "id" => $shortname."_headerAd", "type" => "textarea"), and then echo it out with this: <?php echo get_option('lifestyle_headerAd'); ?>

    Read the article

  • simple wordpress plugin with some html and javascript

    - by h_a86
    I have an html page which i have to convert to wordpress plugin. my code is simple html and javascript <html> <head> <title>Calculate</title> <script language="javascript"> function addNumbers() { var val1 = parseInt(document.getElementById("value1").value); var val2 = parseInt(document.getElementById("value2").value); var ansD = document.getElementById("answer"); ansD.value = val1 + val2; } </script> </head> <body> <input type="text" id="value1" name="value1" value="1"/> <input type="text" id="value2" name="value2" value="2"/> <input type="button" name="Sumbit" value="Click here" onclick="javascript:addNumbers()"/> <input type="text" id="answer" name="answer" value=""/> </body> </html> I know basic plugin writing skills such as <?php /* Plugin Name: Coding friends hello world Plugin URI: http://www.codingfriends.com/ Description: Outputs hello world Version: 0.1 Author: Genux Author URI: http://www.codingfriends.com License: GPL2 */ function codingfriends_helloworld() { //put you form here and javascript here } add_action('get_header', 'codingfriends_helloworld'); ?> Thanks in advance

    Read the article

  • navXT breadcrumbs plugin for wordpress, hide post title

    - by reg3n
    Hi, i'm trying to hide the post titles using this plugin http://mtekk.weblogs.us/code/breadcrumb-navxt/ so i want to show the full breadcrumbs always, except when entering to a post, in there, i just wanna hide the post's title, i find it's code kind'a confusing, i managed to hide the "current page title" but not the "post title" only specifically... anybody with any experience on this?...

    Read the article

  • Wordpress Search Results in Order

    - by Brad Houston
    One of my clients websites, www.kevinsplants.co.uk is not showing the search results in alphabetical order, how do I go about ordering the results in alphabetical order? We are using the Shopp plugin and I believe its that plugin that is generating the results! Cheers, Brad case "orderby-list": if (isset($Shopp->Category->controls)) return false; if (isset($Shopp->Category->smart)) return false; $menuoptions = Category::sortoptions(); $title = ""; $string = ""; $default = $Shopp->Settings->get('default_product_order'); if (empty($default)) $default = "title"; if (isset($options['default'])) $default = $options['default']; if (isset($options['title'])) $title = $options['title']; if (value_is_true($options['dropdown'])) { if (isset($Shopp->Cart->data->Category['orderby'])) $default = $Shopp->Cart->data->Category['orderby']; $string .= $title; $string .= '<form action="'.esc_url($_SERVER['REQUEST_URI']).'" method="get" id="shopp-'.$Shopp->Category->slug.'-orderby-menu">'; if (!SHOPP_PERMALINKS) { foreach ($_GET as $key => $value) if ($key != 'shopp_orderby') $string .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />'; } $string .= '<select name="shopp_orderby" class="shopp-orderby-menu">'; $string .= menuoptions($menuoptions,$default,true); $string .= '</select>'; $string .= '</form>'; $string .= '<script type="text/javascript">'; $string .= "jQuery('#shopp-".$Shopp->Category->slug."-orderby-menu select.shopp-orderby-menu').change(function () { this.form.submit(); });"; $string .= '</script>'; } else { if (strpos($_SERVER['REQUEST_URI'],"?") !== false) list($link,$query) = explode("\?",$_SERVER['REQUEST_URI']); $query = $_GET; unset($query['shopp_orderby']); $query = http_build_query($query); if (!empty($query)) $query .= '&'; foreach($menuoptions as $value => $option) { $label = $option; $href = esc_url($link.'?'.$query.'shopp_orderby='.$value); $string .= '<li><a href="'.$href.'">'.$label.'</a></li>'; } } return $string; break;

    Read the article

  • Wordpress page navigation

    - by Ian
    I used to use a plugin that would give me the option to remove a page from the top navigation but still appear in the side navigation but for the life of me I cannot remember the name of it and I have too many pages for the all to be displayed in the top nav. Can anyone help me? Thanks

    Read the article

  • Wordpress Template HTML CSS Layout Confusion

    - by Jess McKenzie
    I am having huge confusion with a template that I have purchased and I am trying to modify to handle a widget contact form. I am getting close with this but I have now muddled up the CSS or I have a feeling every page has a different CSS structure. The General Layout: What I Manage To Get: HTML View Source: <div id="innerright"> <div id="home" class="page"> <div id="homeslides"> <div class="welcomeslide"> <h1 class="large">Welcome</h1> </div> </div><!-- end home slides --> </div><!-- end page --> <div id="portfolio" class="page"> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span>P</span>ortfolio</h3> </div><!--end pageheader --> <div id="portfolioscroller" class="scrollerenabledpage"> <div class="content"> <h5>Recent Work</h5> <ul class="thumb"> <li><a rel="precision_gallery" href="" title=""><img alt="" src="" /></a></li> </ul> </div> </div><!--end v scroll inner--> </div><!-- end page --> <div id="contact" class="page"> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span>C</span>ontact</h3> </div><!--end pageheader --> <div id="contactscroller"> <h5>Get In Touch</h5> <div id="contactform">content</div> </div><!--end v scroll inner--> </div><!-- end page --> </div><!--end innerright--> CSS: CSS index.php: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php bloginfo('name'); ?></title> <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/style.css" /> <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> <?php // jquery will be included by wp_head function as well as scripts and styles by third party plugins wp_head(); ?> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/plugins.js"></script> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/script.js"></script> <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <?php // background image if one has been set via options if (function_exists('get_option_tree')) { $background_image = get_option_tree('precision_background_image'); //$background_image = ''; $background_color = get_option_tree('precision_background_color'); if ($background_color != '') { echo '<style>body { background-color:'.$background_color.'; }</style>'; } } ?> <script type="text/javascript"> jQuery(document).ready(function($) { $('.page').each(function(index, element) { $(this).css('left', index * 500); }); <?php // if background is set via the OptionTree then load it first if ($background_image != '') { ?> $.vegas({ src:'<?php echo $background_image; ?>', fade:1000, complete:function() { $("#wrapper").fadeIn(1000); $("#bgpanel").fadeIn(1000); $('#mainslide').crossSlide( { speed: 15, fade: 1 }, [ <?php echo $slides; ?> ] ) $('#homeslides').bxSlider({ mode: 'fade', auto: true, controls:false, speed:1000, pause:5000 }); } }); <?php } else { // if no background has been set then fade-in the page ?> $("#wrapper").fadeIn(1000); $("#bgpanel").fadeIn(1000); $('#mainslide').crossSlide( { speed: 15, fade: 1 }, [ //ENTER YOUR MAIN SLIDESHOW IMAGES HERE\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ <?php echo $slides; ?> ] ) $('#homeslides').bxSlider({ mode: 'fade', auto: true, controls:false, speed:1000, pause:5000 }); <?php } ?> //BX SLIDER INNER PAGE SCROLLERS//////////////////////// $('.scrollerenabledpage').each(function(index, element) { $('#' + $(this).attr('id')).bxSlider({ mode: 'vertical', easing: 'easeInOutQuint', auto: false, controls: true, prevImage:'<?php echo get_template_directory_uri(); ?>/images/up.png', nextImage:'<?php echo get_template_directory_uri(); ?>/images/down.png', infiniteLoop: false, hideControlOnEnd: true, pager: true, pagerType:'short', pagerShortSeparator:'of', speed:800, }); }); //END BX SLIDER INNER PAGE SCROLLERS///////////////// $('#submit').click(function(e) { e.preventDefault(); $('form').submit(); }); // contact form $('form').submit(function(e) { $('#main').append('<img src="<?php echo get_template_directory_uri(); ?>/images/loader.gif" class="loaderIcon" alt="Loading..." />'); $.post("<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php", {action:'precision_contact_form_handler', uname:$('input#uname').val(), uemail:$('input#uemail').val(), ucomments:$('textarea#ucomments').val()}, function(data) { $('#main img.loaderIcon').fadeOut(1000); if (data.status == "success") { $('#response').html("Forum has been successfully submitted."); } else { if (data.response != '') { $('#response').html(data.response); } else { $('#response').html("An error occurred while submitting the form. Please try again."); } } }, "json"); return false; }); }); //hides contact form labels when a field gets focus function initOverLabels () { if (!document.getElementById) return; var labels, id, field; labels = document.getElementsByTagName('label'); for (var i = 0; i < labels.length; i++) { if (labels[i].className == 'overlabel') { id = labels[i].htmlFor || labels[i].getAttribute('for'); if (!id || !(field = document.getElementById(id))) { continue; } labels[i].className = 'overlabel-apply'; if (field.value !== '') { hideLabel(field.getAttribute('id'), true); } field.onfocus = function () { hideLabel(this.getAttribute('id'), true); }; field.onblur = function () { if (this.value === '') { hideLabel(this.getAttribute('id'), false); } }; labels[i].onclick = function () { var id, field; id = this.getAttribute('for'); if (id && (field = document.getElementById(id))) { field.focus(); } }; } } }; function hideLabel(field_id, hide) { var field_for; var labels = document.getElementsByTagName('label'); for (var i = 0; i < labels.length; i++) { field_for = labels[i].htmlFor || labels[i].getAttribute('for'); if (field_for == field_id) { labels[i].style.textIndent = (hide) ? '-1000px' : '0px'; return true; } } } window.onload = function () { setTimeout(initOverLabels, 50); }; </script> <?php if (function_exists('get_option_tree')) { $precision_font_family_1 = get_option_tree('precision_font_family_1'); ?> <link href='http://fonts.googleapis.com/css?family=<?php echo $precision_font_family_1; ?>' rel='stylesheet' type='text/css'> <?php } ?> <style> h1, h2 { font-family:<?php echo $precision_font_family_1; ?>; } </style> </head> <body> <div id="wrapper"> <div id="innerleft"> <div id="header"> <?php if (function_exists('get_option_tree')) { $site_logo = get_option_tree('precision_site_logo'); ?> <a href="/" title="<?php bloginfo('name');?>"><img src="<?php echo $site_logo; ?>" alt="<?php bloginfo('name');?>" /></a> <?php } ?> </div><!--end header--> <?php if (function_exists('get_option_tree')) { $precision_slideshow_image = get_option_tree('precision_slideshow_image'); } ?> <ul id="nav"><!--Navigation--> <?php //instead of using wp_nav_menu, we use wp_get_nav_menu_items so that we can store the data in array and re-use it again //wp_nav_menu(array('theme_location' => 'precision-main-menu', 'container' => 'false')); $slt_menuItems = wp_get_nav_menu_items( "precision-main-menu" ); $menusItems = array(); foreach ($slt_menuItems as $slt_menuItem) { $page_title = $slt_menuItem->title; $menuItem = new stdClass; $menuItem->title = $page_title; $menuItem->page_id = $slt_menuItem->object_id; $menusItems[] = $menuItem; ?> <li id="<?php echo strtolower($page_title); ?>nav"><a href="#<?php echo strtolower($page_title); ?>"><?php echo $page_title; ?></a></li> <?php } ?> </ul> <div id="socialMedia"> <ul class="social"> <?php if (function_exists('get_option_tree')) { $twitter_link = get_option_tree('precision_twitter_link'); $facebook_link = get_option_tree('precision_facebook_link'); $gplus_link = get_option_tree('precision_gplus_link'); $delicious_link = get_option_tree('precision_delicious_link'); $flickr_link = get_option_tree('precision_flickr_link'); $vimeo_link = get_option_tree('precision_vimeo_link'); $youtube_link = get_option_tree('precision_youtube_link'); $linkedin_link = get_option_tree('precision_linkedin_link'); ?> <!-- start linkedin icon --> <?php if($linkedin_link != ''){ ?> <li><a href="<?php echo $linkedin_link;?>" title="Follow <?php bloginfo('name'); ?> on Linkedin"><img src="<?php echo get_template_directory_uri();?>/images/social-icons/linkedin.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Linkedin"/></a><li> <?php } ?> <!-- end linkedin icon --> <!--start twitter icon--> <?php if ($twitter_link != '') { ?> <li><a href="<?php echo $twitter_link; ?>" title="Follow <?php bloginfo('name'); ?> on Twitter"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/twitter.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Twitter" /></a></li> <?php } ?> <!--end twitter icon--> <!--start facebook icon--> <?php if ($facebook_link != '') { ?> <li><a href="<?php echo $facebook_link; ?>" title="Follow <?php bloginfo('name'); ?> on Facebook"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/facebook.png" width="49" height="64" alt="<?php bloginfo('name'); ?> Facebook" /></a></li> <?php } ?> <!--end facebook icon--> <!--start google plus icon--> <?php if ($gplus_link != '') { ?> <li><a href="<?php echo $gplus_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/google_plus.png" width="16" height="16" alt="google+" /></a></li> <?php } ?> <!--end google plus icon--> <!--start delicious icon--> <?php if ($delicious_link != '') { ?> <li><a href="<?php echo $delicious_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/delicious.png" width="16" height="16" alt="delicious" /></a></li> <?php } ?> <!--end delicious icon--> <!--start flickr icon--> <?php if ($flickr_link != '') { ?> <li><a href="<?php echo $flickr_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/flickr.png" width="16" height="16" alt="flickr" /></a></li> <?php } ?> <!--end flickr icon--> <!--start vimeo icon--> <?php if ($vimeo_link != '') { ?> <li><a href="<?php echo $vimeo_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/vimeo.png" width="16" height="16" alt="vimeo" /></a></li> <?php } ?> <!--end vimeo icon--> <!--start youtube icon--> <?php if ($youtube_link != '') { ?> <li><a href="<?php echo $youtube_link; ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/social-icons/youtube.png" width="16" height="16" alt="youtube" /></a></li> <?php } ?> <!--end youtube icon--> <?php } ?> </ul> </div> </div><!--end innerleft--> <div id="innerright"> <?php if (function_exists('get_option_tree')) { $precision_home_page_option = get_option_tree('precision_home_page'); $precision_home_page = strtolower(get_the_title($precision_home_page_option)); if ($precision_home_page == '') { $precision_home_page = 'home'; } $precision_contact_page_option = get_option_tree('precision_contact_page'); $precision_contact_page = strtolower(get_the_title($precision_contact_page_option)); if ($precision_contact_page == '') { $precision_contact_page = 'contact'; } } foreach ($menusItems as $menuItem) { ?> <div id="<?php echo strtolower($menuItem->title); ?>" class="page"> <?php if (strtolower($menuItem->title) == $precision_home_page) { ?> <div id="homeslides"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!-- end home slides --> <?php } else { ?> <div class="verticalline"> <div class="scrollprevnext"></div> </div> <div class="pageheader"> <h3><span><?php echo substr($menuItem->title, 0, 1); ?></span><?php echo substr($menuItem->title, 1); ?></h3> </div><!--end pageheader --> <?php $classes = ''; if (strtolower($menuItem->title) == $precision_contact_page) { ?> <div id="<?php echo strtolower($menuItem->title); ?>scroller"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!--end v scroll inner--> <?php } else { $classes = 'scrollerenabledpage'; ?> <div id="<?php echo strtolower($menuItem->title); ?>scroller" class="<?php echo $classes; ?>"> <?php $page_data = get_page($menuItem->page_id); $content = apply_filters('the_content', $page_data->post_content); echo $content; ?> </div><!--end v scroll inner--> <?php } } ?> </div><!-- end page --> <?php } ?> </div><!--end innerright--> <div id="footer"> <p>&copy; <a href="/"><?php bloginfo('name');?></a> | <?php echo date('Y');?></p> </div> </div><!--end wrapper--> </div> <!--Live Preview--> </body> </html>

    Read the article

  • Wordpress Custom Field

    - by kwek-kwek
    I wanted to use the custom field for wordpress to have a different header banner for my site here is my code: <?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="BodyWrap"> <!--MAIN CONT--> <div id="mainCont"> <?php get_sidebar(); ?> <div id="rotateBanner"><?php // check for image $image = get_post_meta($post->ID, 'image', $single = true);?> <img class="mainImg" src="<?php bloginfo(template_url); echo $image; ?>" alt=""/> </div> <div id="mainCopy"> <div id="content"> <h2><?php single_post_title(); ?></h2> <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> </div> </div> <?php endwhile; endif; ?> <?php get_footer(); ?> Now the code renders but for some reason it only renders the img path as: <img alt="" src="http://www.testground.idghosting.com/philcom/wp-content/themes/phil"/> here is the demosite in the custom field I put this: image For the value I put this: /images/sampleHead.png

    Read the article

  • plupload not working in wordpress theme files

    - by Kedar B
    This is my code for image upload.... <a id="aaiu-uploader" class="aaiu_button" href="#"><?php _e('*Select Images (mandatory)','wpestate');?></a> <input type="hidden" name="attachid" id="attachid" value="<?php echo $attachid;?>"> <input type="hidden" name="attachthumb" id="attachthumb" value="<? php echo $thumbid;?>"> i want upload functionality more than one time in single page in wordpress.i have add js code for that same as first upload block but its not working. This is js code for image upload.... jQuery(document).ready(function($) { "use strict"; if (typeof(plupload) !== 'undefined') { var uploader = new plupload.Uploader(ajax_vars.plupload); uploader.init(); uploader.bind('FilesAdded', function (up, files) { $.each(files, function (i, file) { // console.log('append'+file.id ); $('#aaiu-upload-imagelist').append( '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b>' + '</div>'); }); up.refresh(); // Reposition Flash/Silverlight uploader.start(); }); uploader.bind('UploadProgress', function (up, file) { $('#' + file.id + " b").html(file.percent + "%"); }); // On erro occur uploader.bind('Error', function (up, err) { $('#aaiu-upload-imagelist').append("<div>Error: " + err.code + ", Message: " + err.message + (err.file ? ", File: " + err.file.name : "") + "</div>" ); up.refresh(); // Reposition Flash/Silverlight }); uploader.bind('FileUploaded', function (up, file, response) { var result = $.parseJSON(response.response); // console.log(result); $('#' + file.id).remove(); if (result.success) { $('#profile-image').css('background-image','url("'+result.html+'")'); $('#profile-image').attr('data-profileurl',result.html); $('#profile-image_id').val(result.attach); var all_id=$('#attachid').val(); all_id=all_id+","+result.attach; $('#attachid').val(all_id); $('#imagelist').append('<div class="uploaded_images" data- imageid="'+result.attach+'"><img src="'+result.html+'" alt="thumb" /><i class="fa deleter fa-trash-o"></i> </div>'); delete_binder(); thumb_setter(); } }); $('#aaiu-uploader').click(function (e) { uploader.start(); e.preventDefault(); }); $('#aaiu-uploader2').click(function (e) { uploader.start(); e.preventDefault(); }); } });

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >