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. Added animated twitter bird widget code on site.. the bird appears on the site.. but when the bird moves the animation seems out of sink, not smooth.. Have a look at the site. you'll notice the problem when the bird moving... http://www.r7alh.com/ the same code working fine on my localhost. <!-- Twitter Bird Widget for Blogger by Way2blogging.org --> <script type="text/javascript" src="http://widgets.way2blogging.org/blogger-widgets/w2b-tripleflap.js"> </script> <script type="text/javascript"> var twitterAccount = "way2blogging"; var tweetThisText = " <data:blog.pageTitle/> : <data:blog.url/> "; tripleflapInit(); </script> <span style="font-size:11px;position:absolute;"><a title='Blogger Widget by Way2blogging.Org' href="http://www.way2blogging.org" target='_blank'>Blogger Widgets</a></span> <!-- Twitter Bird Widget for Blogger by Way2blogging.org --> The same code working fine on blogs and other websites. only problem is in this site.. http://www.r7alh.com/ what will be the problem? how to fix this? http://www.way2blogging.org/2011/04/add-animated-flying-twitter-bird-widget.html
  2. The URL is http://crispylogs.com/writing-high-quality-posts-to-increase-traffic-top-20-tips/ I am trying to add an effect, like a magazine's "drop-cap," but it's not working for me, and I don't know why. The following is the CSS code I have used: .single .entry p:first-child:first-letter { float: left; color: #903; font-size: 47px; line-height: 40px; padding-top: 0px; padding-right: 8px; padding-left: 3px; font-family: Georgia; }
  3. I'm basically trying to move the logo on my site to the center instead of having it on the left. I've tried a bunch of things but have had no success. The site is a wordpress with a WPhufingtonpost installed. Thanks for your help in advanced. http://queencitypets.com Here is the code for the title in the header: <ul id="title-logo"> <li> <h1> <?php global $options; foreach ($options as $value) { if (get_settings($value['id']) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings($value['id']); } } if (empty($wpc_logo_url)) { $wpc_logo_url = get_bloginfo('template_url') . '/images/logo.png'; } ?> <a href="<?php bloginfo('url'); ?>" title="Home"><img src="<?php echo $wpc_logo_url; ?>" width="300" align="middle" alt="" /></a> </h1> </li> </ul> Here is the code in the style-sheet: /* Theme Name: Apptha Post Theme URI: http://www.apptha.com/ Description: Apptha post template is designed to create a fresh, clean and flexible WordPress powered news portal. The theme is equipped with independent widgets for featured post, recent post, facebook, advertisement space etc enriching the news portal to be more functional and lively. Author: Apptha Themes Author URI: http://www.apptha.com Version: 2.0 Tags: one-columns, right-sidebar, white, news, news-bank, online-news, news-paper, news-feed, post, news-banner, news-post, custom-menu, fixed-width, flexible-width, custom-background, custom-colors, full-width-template, editor-style */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { background: transparent; border: 0; margin: 0; padding: 0; vertical-align: baseline; font-style: normal; } body { line-height: 20px; font-family: Arial, Helvetica, "Nimbus Sans L", sans-serif; font-size: 13px; color:#333; table-layout: fixed; word-wrap:break-word; background: #e8e8e8; /* font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;*/ } body{word-break:break-word;} h1 a, h2 a, h3 a, h4 a, h5 a, h6 a{color:#000 !important;} h1, h2, h3, h4, h5, h6 { clear: both; font-weight: normal; margin: 1% 0; line-height: 25px; color:#000; } a {text-decoration: none;} a:hover {text-decoration: underline;} #content .post:last-child{border: none;} ol, ul { list-style: none; } blockquote, blockquote p { quotes: none; font-style: italic; padding: 1% 2%; } blockquote:before, blockquote:after { content: ''; content: none; } del { text-decoration: line-through; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; } a img { border: none; } /* =Layout -------------------------------------------------------------- */ #access .menu-header, div.menu, #colophon, #branding, #main { margin: 0 auto; } #wrapper { background: #fff; padding: 0 1.5%; width: 940px; margin: 0 auto; word-wrap: break-word; /* -moz-box-shadow: 0px 1px 7px #999; -webkit-box-shadow: 0px 1px 7px #999; box-shadow: 0px 1px 7px #999;*/ box-shadow: 0 0 8px rgba(0,0,0,.2); -webkit-box-shadow: 0 0 8px rgba(0,0,0,.2); -moz-box-shadow: 0 0 8px rgba(0,0,0,.2); } #app-header{width: 980px; margin: 0.5% auto 0; font-size: 12px; } #header-nav ul li{display: inline;} #header-nav{padding: 0 1.5%; width: 75%; float: left; margin-bottom: 0.5%; } .clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .clearfix { display: inline-block; } .clear{clear:both;} /* =Header -------------------------------------------------------------- */ #header { margin: 1% 0 0 0; float: left; width: 100%; } #header-menu .page_item a{padding: 0 1%;} #header-menu li{margin: 0 4% 0 0;} #header-menu a{color:#000; font-weight: bold;} #header-calendar img{vertical-align: middle; margin-right: 5%; cursor: pointer;} #header-calendar{width: 8%; float: right; font-weight: bold; text-align: right; padding-right: 3%; background: url(images/app-calendar.png) no-repeat 100% 0%; margin: 0 2% 0 7%; border-left:1px solid #000; cursor: pointer; } #app-header-calendar{z-index: 999} #app-header-calendar a{/*color: #0099FF;*/ font-weight: bold; z-index: 999; position: relative;} #header-calendar:hover div#app-header-calendar{ position: absolute; width: 17%; margin-right: 10%; right: 3.7%; cursor: default; } #wp-calendar #prev{text-align: left;} #wp-calendar #next{text-align: right;} #app-header-calendar #wp-calendar tfoot{padding: 0 0 3% 0;} #app-header-calendar #wp-calendar, #app-header-calendar #wp-calendar tbody tr{font-weight: normal; color:#000; } #app-header-calendar #wp-calendar, #app-header-calendar #wp-calendar caption { background: #fff; /*border: #0099FF solid 1px;*/ width: 99.8%; font-weight: bold; text-align: center; padding: 1% 0; -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } #app-header-calendar #wp-calendar caption{color: #fff} #header #title-logo{width: 50%; float: center; margin-top:10%; } #header #title-logo a{font-family: Georgia, Arial; font-size: 30px; /*color:#0099FF;*/ text-shadow: #666666 0.09em 0.09em 0.09em; text-align:center; } #header #header-search{width: 50%; float: left; text-align: center; } #header #header-search #mainsearchform{ /*margin-top:5%;*/ } #header #header-search li{margin-top: 4%;} #header #header-search input[type="text"]{ /* border: #0099FF 1px solid;*/ width: 65%; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding: 1% 6% 1% 1%; background: #f2f2f2; } #header #header-search .submit{background: url("images/search.png") no-repeat center; border: medium none; /*border-left: 1px solid #0099FF;*/ margin: 0 0 0 -7%; width: 6%; cursor: pointer; padding: 0 0 0 1%; height:17px; position:relative; *margin-top:8px; } @media \0screen { #header #header-search .submit{top:4px;position:relative;} } #app-today-date{font: 12px/16px Georgia, Arial, "Helvetica Neue", Helvetica, sans-serif; color:#747474; } #header #header-social-icon{width: 25%; float: right; text-align: center; padding-top: 1%; font-weight: bold; } #header #header-social-icon li{margin: 2% 0;} #header #header-social-icon li a{margin: 0 2%;} #site-title { float: left; width: 700px; } #site-title a { text-decoration: none; } #site-description { } /* This is the custom header image */ #branding img { display: block; float: left; } .app-header-category a:hover{text-decoration: none} .app-header-category{width: 100%; float: left; font: 14px "Helvetica Neue", Helvetica, sans-serif; -moz-box-shadow: 0px 2px 5px #999; -webkit-box-shadow: 0px 2px 5px #999; box-shadow: 0px 2px 5px #999; /*background: -moz-linear-gradient(top, #0099FF, #008AFF); background: -webkit-gradient(linear, left top, left bottom, from(#0099FF), to(#008AFF)); background: -moz-linear-gradient(top, #0099FF, #008AFF); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0099FF', endColorstr='#008AFF');*/ margin: 1.5% 0; height: 36px; text-transform: uppercase; } .app-header-category .current-cat .children li a{color: #fff !important} .app-header-category .current-cat .children li a:hover{color: #000 !important} .children .current-cat{background: none;} .app-header-category li{display: inline; /*border-right: 1px solid #4DB8FF;*/ } .app-header-category li ul li{border: none; } .app-header-category a{color: #fff; font-weight: bold; } /*.app-header-category li ul {;}*/ #MoreDiv1 li{border: none; float: right; padding-right: 1%;} #MoreDiv1 li ul li{float: left;} #header-nav{} #header-nav ul li{} #header-nav, .app-header-category{ z-index: -2; } #header-nav a:hover, .app-header-category a:hover{} li.current_page_item a{z-index: 10;} ul.children{z-index:9;} #header-nav li:first-child { } li.current_page_item{} #header-nav li:hover { } #header-nav li:active{color: #000000;} #header-nav ul li a { border-right: 0 none; display: block; text-decoration: none; } #header-nav ul li a:hover{ } #header-nav ul li ul li a, .app-header-category ul li ul li a{ border-right: 0 none; display: block; height: 21px; /* line-height: 29px; padding: 4px 10px 12px 5px;*/ /* width: 135px;*/ margin-top: -3px; } #header-nav ul, .app-header-category ul{ list-style-type: none; margin: 0; padding: 0; /* display: table;*/ } #header-nav ul li, .app-header-categoryul li { position: relative; width: auto; display: table-cell; } #header-nav ul.menunav li ul { } .app-header-category ul li ul{border-radius:0 0 5px 5px; padding:1% 1% 0.5% 0.5%; } #app-header #header-nav #header-menu ul{border-radius:5px 5px;} #header-nav ul li ul li, .app-header-category ul li ul li { float: none; position: relative; display: block; padding: 3% 5%; } #header-nav table { border-collapse: collapse; left: 0; position: absolute; top: 0; } #header-nav ul ul{ position: absolute; visibility: hidden; /*background: #09f;*/ } .app-header-category ul ul{ position: absolute; visibility: hidden; /*background: #09f;*/ } #header-nav ul *:hover ul, .app-header-category ul *:hover ul { visibility: visible; } #header-nav ul *:hover ul ul, .app-header-category ul *:hover ul ul { visibility: hidden; } #header-nav ul *:hover ul *:hover ul, .app-header-category ul *:hover ul *:hover ul { visibility: visible; } #header-nav ul *:hover ul *:hover ul ul, .app-header-category ul *:hover ul *:hover ul ul { visibility: hidden; } #header-nav ul ul ul, .app-header-category ul ul ul { left: 145px; top: 0; } #header-nav ul li, .app-header-category ul li { float: left; } #header-nav .sub_left, .app-header-category .sub_left { left: -150px; } #header-nav ul *:hover ul *:hover ul *:hover ul, .app-header-category ul *:hover ul *:hover ul *:hover ul { visibility: visible; } #header-nav ul *:hover ul *:hover ul *:hover ul ul, .app-header-category ul *:hover ul *:hover ul *:hover ul ul { visibility: hidden; } #header-nav ul *:hover ul *:hover ul *:hover ul *:hover ul, .app-header-category ul *:hover ul *:hover ul *:hover ul *:hover ul { visibility: visible; } #header-nav ul *:hover ul *:hover ul *:hover ul *:hover ul ul, .app-header-category ul *:hover ul *:hover ul *:hover ul *:hover ul ul { visibility: hidden; } #header-nav ul li:hover { } #header-nav ul li ul li:hover { } #header-nav ul *:hover ul, .app-header-category ul *:hover ul { visibility: visible; } #header-nav ul li ul { ;} #header-nav ul li ul li a{} #header-nav ul li ul li a:hover { } /* HEADER END --------------------------------------------************************/ #container { float: left; width: 100%; /* margin: 0 -24% 0 0;*/ /* width: 66%;*/ } #container a:hover{color: #000; text-decoration: underline;} #content { /* margin: 0 280px 0 0px;*/ } #primary, #secondary { overflow: hidden; } #secondary { clear: right; } #footer { clear: both; width: 100%; border-top: 1px solid #dfdfdf; padding: 2% 0 0 0; } #footer #footer-ad{text-align: center;} .one-column #content { margin: 0 auto; width: 640px; } .single-attachment #content { margin: 0 auto; width: 900px; } /* Structure the footer area */ #footer-widget-area { overflow: hidden; } #footer-widget-area .widget-area { float: left; margin-right: 20px; width: 220px; } #footer-widget-area #fourth { margin-right: 0; } #site-info { float: left; width: 700px; } #site-generator { float: right; width: 220px; } hr { border: 0; clear: both; } /* Text elements */ strong { font-weight: bold; } abbr, acronym { cursor: help; } sup, sub { height: 0; line-height: 1; position: relative; vertical-align: baseline; } sup { bottom: 1ex; } sub { top: .5ex; } input[type="text"], textarea { } /* =Menu -------------------------------------------------------------- */ #access { display: block; float: left; margin: 0 auto; width: 940px; } #access .menu-header, div.menu { margin-left: 12px; width: 928px; } #access .menu-header ul, div.menu ul { list-style: none; margin: 0; } #access .menu-header li, div.menu li { float: left; position: relative; } #access a { display: block; padding: 0 10px; text-decoration: none; } #access ul ul { box-shadow: 0px 3px 3px rgba(0,0,0,0.2); -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); display: none; position: absolute; top: 38px; left: 0; float: left; width: 180px; z-index: 99999; } #access ul ul li { min-width: 180px; } #access ul ul ul { left: 100%; top: 0; } #access ul ul a { padding: 10px; width: 160px; height: auto; } #access ul li:hover > ul { display: block; } #main { clear: both; overflow: hidden; } #content table { margin: 0 -1px 24px 0; text-align: left; width: 100%; } #content tr th, #content thead th { line-height: 18px; padding: 9px 24px; } #content tr td { padding: 6px 24px; } .hentry { margin: 0 0 48px 0; } .home .sticky { ; margin-right: -20px; padding: 18px 20px; } .entry-content blockquote.right { float: right; margin-left: 24px; margin-right: 0; text-align: left; width: 33%; } .entry-content img{float: right;} .entry p{margin: 0% 0 2% 0;} /* =Images -------------------------------------------------------------- */ img.size-auto, img.size-full, img.size-large, img.size-medium, .attachment img { max-width: 100%; /* When images are too wide for containing element, force them to fit. */ height: auto; /* Override height to match resized width for correct aspect ratio. */ } /* =Navigation -------------------------------------------------------------- */ .navigation { overflow: hidden; } .app-post-navigation{width: 100%;margin: 1% 0; float: left; } .app-post-navigation a{color: #000;} .app-post-navigation .alignleft{float: left;} .app-post-navigation .alignright{float: right;} .nav-previous { float: left; width: 50%; } .nav-next { float: right; text-align: right; width: 50%; } #nav-above { margin: 0 0 18px 0; } #nav-above { display: none; } .paged #nav-above, .single #nav-above { display: block; } #nav-below { margin: -18px 0 0 0; } /* =Comments -------------------------------------------------------------- */ #comments { clear: both; } h3#comments-title, h3#reply-title { margin-bottom: 0; } .commentlist { list-style: none; margin: 0; } .commentlist li.comment { border-bottom: 1px solid #e7e7e7; margin: 0 0 24px 0; padding: 0 0 0 56px; position: relative; } .commentlist li:last-child { border-bottom: none; margin-bottom: 0; } #comments .comment-body ul, #comments .comment-body ol { margin-bottom: 18px; } #comments .comment-body p:last-child { margin-bottom: 6px; } .commentlist ol { list-style: decimal; } .commentlist .avatar { position: absolute; top: 4px; left: 0; } .comment-author { } .comment-meta { margin: 0 0 18px 0; } .reply { padding: 0 0 24px 0; } .nopassword, .nocomments { display: none; } #comments .pingback p { display: block; margin: 0; } /* Comments form */ #respond { margin: 24px 0; overflow: hidden; position: relative; } #respond p { margin: 0; } #respond .comment-notes { margin-bottom: 1em; } .form-allowed-tags { line-height: 1em; } .children #respond { margin: 0 48px 0 0; } h3#reply-title { margin: 18px 0; } #comments-list #respond { margin: 0 0 18px 0; } #comments-list ul #respond { margin: 0; } #respond input { margin: 0 0 9px; /* width: 98%;*/ } #respond textarea { width: 98%; } #respond .form-submit { margin: 12px 0; } /* =Widget Areas -------------------------------------------------------------- */ .widget-area ul { list-style: none; } .widget_search #s {/* This keeps the search inputs in line */ width: 60%; } .widget_search label { display: none; } #wp-calendar { width: 100%; } #wp-calendar tfoot #next { text-align: right; } .widget_rss .widget-title img { width: 11px; height: 11px; } .widget-area, .widget{margin: 0% 0 1% 0} .widget-area a{color: #333;} .widget-area a:hover{/*color: #0088C3;*/ text-decoration: underline;} .widget-area li{padding: 1% 0; border-bottom: 1px dotted #DFDFDF;} /* =Footer -------------------------------------------------------------- */ /* =Mobile Safari ( iPad, iPhone and iPod Touch ) -------------------------------------------------------------- */ pre { -webkit-text-size-adjust: 140%; } code { -webkit-text-size-adjust: 160%; } #access, .entry-meta, .entry-utility, .navigation, .widget-area { -webkit-text-size-adjust: 120%; } .entry-utility{margin: 1% 0; background: #f4f4f4; border-radius:5px; padding: 0 1%;} #site-description { -webkit-text-size-adjust: none; } .comments-link{float: right;} /* =Print Style -------------------------------------------------------------- */ @media print { body { background: none !important; } #wrapper { clear: both !important; display: block !important; float: none !important; position: relative !important; } #header { border-bottom: 2pt solid #000; padding-bottom: 18pt; } #colophon { border-top: 2pt solid #000; } #site-title, #site-description { float: none; line-height: 1.4em; margin: 0; padding: 0; } #access, #branding img, #respond, .comment-edit-link, .edit-link, .navigation, .page-link, .widget-area { display: none !important; } #container, #header, #footer { margin: 0; width: 100%; } #content, .one-column #content { margin: 24pt 0 0; width: 100%; } .wp-caption p { font-size: 11pt; } #site-info, #site-generator { float: none; width: auto; } #colophon { width: auto; } img#wpstats { display: none; } #site-generator a { margin: 0; padding: 0; } #entry-author-info { border: 1px solid #e7e7e7; } #main { display: inline; } .home .sticky { border: none; } } /********************** Index Page *******************************/ .widget-area h3{width: 100%;} #app-featured-post h3, #app-index-post h3, .sidebar-item h3{ font: 15px "Helvetica Neue", Helvetica, sans-serif; background: #09F; color:#fff; font-weight: bold; padding: 2% 1% 1.5% 2.1%; margin: 0% 0 3%; -moz-box-shadow: 2px 2px 2px #ccc; -webkit-box-shadow: 2px 2px 2px #ccc; box-shadow: 2px 2px 2px #ccc; /*background: -moz-linear-gradient(top, #09F, #008AFF); background: -webkit-gradient(linear, left top, left bottom, from(#09F), to(#008AFF)); background: -moz-linear-gradient(top, #09F, #008AFF); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0099FF', endColorstr='#008AFF'); */ text-transform: uppercase; } #app-featured-post{padding: 0 1% 0 0; width: 30%; float: left;} #app-featured-post h2, #app-index-post h2{font-size: 14px; font-weight: bold; line-height: 22px;} #app-featured-post h2 a{font-size: 14px; line-height: 22px;} #app-featured-post h2 a.app-index-title{*display:block; *clear:both;} @media \0screen { #app-featured-post h2 a.app-index-title{display:block; clear:both;} } #app-featured-post { padding-right: 2%; /* width: 100%;*/ } #app-featured-post .entry{font-family: Georgia, Arial;} #app-featured-post .post, #app-index-post #post-, .post, .hentry{border-bottom: 1px solid #dfdfdf; padding-bottom: 4%; margin-bottom: 4%;} #app-featured-post .app-featured-news .post:last-child, #app-index-post #post-:last-child{border: none;} .app-featured-news{width: 100% !important; overflow-y: visible !important; /*height: 980px !important*/} .app-index-title{color:#000; /* padding-left: 2%;*/ } .app-index-category a{color:#fff !important;} .app-index-category{color:#fff;} .app-index-category{/*background-color: #03497E;*/ font-size: 13px; padding: 0 1.5% 1.5% 1%; -moz-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; float: left; height: 16px; } .app-category-arrow{/*background: url("images/cat-arrow-blue.png") no-repeat;*/ float: left; height: 18px; width: 4%; margin-top: 0.4%; margin-right: 2%; } .app-date, .app-date-archive{font-style: italic; color: #48583D; font-size: 11px; } .app-innerpage-content .app-date{font-style: normal; border-bottom: 2px solid #333; margin-bottom: 1%; width: 100%; } .readmore{color: #000; font-weight: bold; font-size: 11px;} .readmore a:hover{color: #000;} .hentry, .post{margin-bottom: 4%;} .app-index-page{width: 100%; table-layout: fixed; word-wrap: break-word; margin: 1% 0; } .app-index-page td{ vertical-align: top; /* padding: 0 1.5%;*/ word-wrap:break-word; } #td-app-featured-post{} #app-index-post{padding: 0 2%; overflow: hidden;} #app-index-post img{width: 308px !important;} #td-app-index-post{ float: left; width: 34.2%; } #app_widget{padding-left: 2%; float: right; width: 31.5%;} .app-inner-page-table{table-layout: fixed; width: 100%; word-wrap:break-word; margin-bottom: 1%; } .app-inner-page-table td{vertical-align: top; word-wrap: break-word;} .post{word-wrap: break-word;} .app-innerpage-sidebar{width: 29%; padding-left: 1%} .app-innerpage-content{width: 58.5%; border-right: 1px solid #DFDFDF; padding-right: 1%; } .categories a, .tags a{font-weight: bold;} .categories, .tags{margin-top: 1%; background: #f4f4f4; border-radius:5px; padding: 1%; clear: both; width: 98%; } .socialicons li{display: inline;} .socialicons ul{margin: 1% 0;} .socialicons-content{float: left;width: 48%;margin: 0 1% 0.5% 0;} .socialicons{ /* border-radius: 0 0 4px 4px ;*/ border: 1px solid #C7D0DF; padding: 1%; } .socialicons-header{background-color: #EBEFF4; border-radius: 4px 4px 0 0; border: 1px solid #C7D0DF; border-bottom: 1px solid #A2B5D3; color: #333; font-family: Arial,sans-serif; font-size: 11px !important; text-transform: uppercase; font-weight: bold; text-align: left; padding: 1%; } .fb-recommend{padding: 1%; width: 100%;} .app-inner-page-table .fb_iframe_widget iframe{width: 620px !important;} .app-inner-page-table #primary .fb_iframe_widget iframe{width: auto !important;} #app-home-banner{width: 100%; margin: 1% 0; float: left;} .app-home-banner-slide{width: 19%; margin-left: 1.1%; float: left; } #app-home-banner .app-home-banner-slide:first-child{margin-left: 0;} #app-home-banner li{display: inline;} .app-home-banner-img img{width: 178px;} /****************************************** */ #nav { margin:0; padding:0; list-style:none; } #nav li { float:left; display:block; position:relative; z-index:500; /* margin-top:3px; margin-bottom:3px;*/ /* margin: 0.8px 0;*/ padding: 0.4% 1%; } /* this is the parent menu */ #nav li a { display:block; padding:5px 5px 0 5px; height:20px; color:#fff; } #nav li a:hover { color:#fff; } /* you can make a different style for default selected value */ #nav a.selected { color:#f00; } /* submenu, it's hidden by default */ #nav ul { position:absolute; left:0; /* display:none;*/ /* margin:0% 0 0 -10%;*/ padding:0; list-style:none; } #nav ul li { min-width:150px; float:left; padding: 5% 0 0 3%; } /* display block will make the link fill the whole area of LI */ #nav ul a { display:block; /* height:15px;*/ } #nav ul ul{left:98%; position: absolute;} #MoreDivsec li{ border: none; float: right;} #MoreDivsec ul{left:-135px; padding: 1% 1% 0.5% 0.5%;} .app-header-category #nav li a:hover{color:#000;} .app-header-category #nav ul li:last-child a{border:none;} .app-header-category ul ul{box-shadow: 0 2px 8px #ccc; -webkit-box-shadow: 0 2px 8px #ccc; -moz-box-shadow: 0 0 2px #ccc; /* background: -moz-linear-gradient(top, #008AFF, #09F); background: -webkit-gradient(linear, left top, left bottom, from(#008AFF), to(#0099FF)); background: -moz-linear-gradient(top, #008AFF, #09F); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#008AFF', endColorstr='#0099FF');*/ } .app-banner-slider-img{height: 130px;overflow: hidden;} .app-banner-slider-img img{max-width: 230px} .app-banner-title h5{margin: 0; font-weight: bold; line-height: normal; min-height: 28px; font-size: 14px;} .app-banner-title a h5:hover{text-decoration: underline; /*color:#fff;*/} .app-banner-title a:hover{text-decoration: none;} .app-banner-title a.app-banner-read:hover, .app-banner-title a.app-banner-comment:hover{text-decoration: underline;} .app-banner-read, .app-banner-comment{/*color: #09f;*/ font-size: 10px; font-weight: bold;} .app-banner-read{float: left;} .app-banner-comment{float: right;} .app-banner-content {width: 100%; float: left;} .app-banner-content li{float: left; width: 24%; margin-left: 7.2%; } .app-banner-content li:first-child{/*margin-left: 0%; */} #app-banner{width: 100%; padding: 1% 0; margin-bottom: 0.5%; float: left; border-bottom: 1px solid #DFDFDF; position: relative;} #app-banner .app-banner-content:first-child{margin-left: 0;} #post-banner-prev{position: absolute; z-index: 9999; width: 14px; height: 21px; margin-top:62px; opacity :0.4; cursor: pointer;} #post-banner-next{position: absolute; z-index: 9999; width: 14px; height: 21px; margin-top:62px; right:0; opacity :0.4; cursor: pointer} #app-banner:hover #post-banner-prev, #app-banner:hover #post-banner-next{opacity:1;} .entry img{float: left; margin:0 2% 1% 0; max-width: 620px;} #app-featured-banner .app-banner-content li{float: left; width: 100%; margin: 0%; } #app-featured-banner h5{font-size: 36px; text-align: center;} /*slider style*/ #cafe-post-banner-prev{position: relative; top:40%; left:-1%; float:left; cursor: pointer; padding: 0px 0 0 10%; height: 20px; } #cafe-post-banner-next{position: relative; top:40%; left:1%; float: right; cursor: pointer; padding: 0px 0 0 10%; height: 20px; } .app-pagination{background: #fff; float: right; position: relative; margin: -11.7% 1.3% 0 0; width: 22%; /* padding: 1%;*/ } #pagefeature{float: left; padding: 3% 0 0 5%; font-weight: bold; font-size: 12px;} .app-pagination .prev{background: url(images/app-page-prev.png) no-repeat center; float: left; width: 6px;} .app-pagination .next{background: url(images/app-page-next.png) no-repeat center; float: right; width: 6px;} #td-app-index-post-single #app-featured-post h3, #app-index-post h3, .sidebar-item h3{/*margin: 1.5% 0 3%;*/} .sidebar-item h3{width: 100%;} #td-app-index-post-single #app-index-post{padding: 0; width: 65%; float: left; margin-right: 2%;} #td-app-index-post-single #app-index-post h3{padding: 1% 1% 0.5%;} #td-app-index-post-single .app-index-category{padding: 0 1.5% 0.5% 1%;} #td-app-index-post-single .app-category-arrow{margin-top: 0.3%; margin-right: 0%;} #td-app-index-post-single{border-right: 1px solid #dfdfdf; padding-right: 1%;} #footer-nav {width: 100%;} #footer-nav #header-menu li { display: inline; margin-right: 1%; } #footer-nav #header-menu a{color: #666; font-size: 85%;} #footer-nav #header-menu a:hover{color: #000;} #footer-nav #header-menu .children{display: none;} #footer-copyright{float: right; margin-top: 1%} #footer-copyright a:hover{text-decoration: underline;} #header-flash-roller{width: 100%; /* margin-top: 1.5%;*/} #header-flash{width: 65%; float: left; border: 1px solid #DFDFDF;} #header-subscribe-widget{width: 25%; margin-left: 5%; float: right; text-align: right;} #header-subscribe-widget form input[type=text]{width: 65%; border: 1px solid #dfdfdf;} #header-subscribe-widget form input[type=submit]{box-shadow: 0 2px 8px #ccc; -webkit-box-shadow: 0 2px 8px #ccc; -moz-box-shadow: 0 0 2px #ccc; font-size: 12px; font-family: arial, georgia; } /******************/ #header-flash-prev{background: url(images/header-flash-prev.png) no-repeat; width: 17px; height: 18px; float: left; cursor: pointer; margin: 0.5%;} #header-flash-next{background: url(images/header-flash-next.png) no-repeat; width: 17px; height: 18px; float: right; cursor: pointer; margin: 0.5%;} .header-flash-title{float: left; width: 90%; height: 20px !important; text-align: center;} .header-flash-title .latest-title{font-size: 12px; padding-left: 25px; width: 93% !important; margin-top:0.5%;} .latest-title a{font-weight: bold; color:#000; margin-right: 5%;} .latest-title .latest-time{margin-left: 0%; color: #A81817;font-size: 11px; width: 51%; /*float: right; text-align: right;*/} #copy{} .related-post img{float: left; width: 20%; height:auto;} .related-post a{float: left; width: 78%; padding-left: 2%;} .sidebar-item{margin-bottom: 5%;} .sidebar-item img, .sidebar-item a img{max-width: 295px;} #app_header_ad{text-align: center;} #featured-image-index-banner{border-bottom: 1px solid #dfdfdf; padding: 5px; text-align: center;} #featured-image-index-banner a h5{font-size: 65px;line-height: 60px; font-weight: bold; text-transform: uppercase; margin:2.5% 0;} #featured-image-index-banner a:hover {text-decoration: underline;} .blogroll img, .blogroll a img{width:100%;} /*#featured-image-index-banner a img{height: 350px !important;}*/ /************************* COLOR BLUE *****************/ /* =Gallery listing -------------------------------------------------------------- */ .format-gallery .size-thumbnail img, .category-gallery .size-thumbnail img { border-top: 2px solid #000000; margin-bottom: 0; } .format-gallery .gallery-thumb, .category-gallery .gallery-thumb { /*float: left;*/ margin-right: 20px; margin-top: -4px; } .home #content .format-gallery .entry-utility, .home #content .category-gallery .entry-utility { padding-top: 4px; } /* =Attachment pages -------------------------------------------------------------- */ .attachment .entry-content .entry-caption { font-size: 140%; margin-top: 24px; } .attachment .entry-content .nav-previous a:before { content: '\2190\00a0'; } .attachment .entry-content .nav-next a:after { content: '\00a0\2192'; } /* =Images -------------------------------------------------------------- */ /* Resize images to fit the main content area. - Applies only to images uploaded via WordPress by targeting size-* classes. - Other images will be left alone. Use "size-auto" class to apply to other images. */ img.size-auto, img.size-full, img.size-large, img.size-medium, .attachment img { max-width: 100%; /* When images are too wide for containing element, force them to fit. */ height: auto; /* Override height to match resized width for correct aspect ratio. */ } .alignleft, img.alignleft { display: inline; float: left; margin-right: 1%; margin-top: 4px; } .alignright, img.alignright { display: inline; float: right; margin-left: 24px; margin-top: 4px; } .aligncenter, img.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; } img.alignleft, img.alignright, img.aligncenter { margin-bottom: 1%; } .wp-caption { background: #f1f1f1; line-height: 18px; margin-bottom: 20px; max-width: 632px !important; /* prevent too-wide images from breaking layout */ padding: 4px; text-align: center; } .wp-caption img { margin: 5px 5px 0; } .wp-caption p.wp-caption-text { color: #888; font-size: 12px; margin: 5px; } .wp-smiley { margin: 0; } .gallery { margin: 18px auto 18px;text-align: center; } .gallery .gallery-item { float: left; margin-top: 0; margin-bottom: 15px; text-align: center; width: 33%; } .gallery-columns-2 .gallery-item { width: 50%; } .gallery-columns-4 .gallery-item { width: 25%; } .gallery img { border: 2px solid #cfcfcf; } .gallery-columns-2 .attachment-medium { max-width: 92%; height: auto; } .gallery-columns-4 .attachment-thumbnail { max-width: 84%; height: auto; } .gallery .gallery-caption { color: #888; font-size: 12px; margin: 0 0 12px; } .gallery dl { margin: 0; } .gallery img { border: 10px solid #f1f1f1; } .gallery br+br { display: none; } #content .attachment img {/* single attachment images should be centered */ display: block; margin: 0 auto; } /**************************** Header & menu Widget ******************************************/ #header-nav .sidebar-item h3, .app-header-category .sidebar-item h3 {display:none;} #header-nav .sidebar-item {margin: 0;} #header-nav .sidebar-item ul, .app-header-category .sidebar-item ul{float: left;width: 100%; position:relative;} #header-nav .sidebar-item ul li{margin-right:20px; font-weight: bold;} #header-nav .sidebar-item ul li a{color:#000;} #header-nav .sidebar-item ul li ul{position:absolute; min-width: 175px;-webkit-border-radius: 5px; -moz-border-radius: 5px;border-radius: 5px;} #header-nav .sidebar-item ul li ul a{color:#fff;} #header-nav .sidebar-item ul li ul li{padding: 4% 5% 2%;} .app-header-category .sidebar-item ul li{padding:10px; position:relative; } .app-header-category .sidebar-item ul a:hover{color:#000;} .app-header-category .sidebar-item ul li:first-child{} .app-header-category .sidebar-item ul li a{padding: 0 10px 0 0;} .app-header-category .sidebar-item ul li ul{position:absolute; min-width: 175px;} .app-header-category .sidebar-item ul li ul.children{top: 35px; left:0;} .app-header-category .sidebar-item ul li ul.children li{padding: 10px 10px 5px;} .app-header-category .sidebar-item ul #MoreDivsec ul{top: 36px; z-index: 99999;} .app-header-category .sidebar-item ul #MoreDivsec ul ul{top: 0px; left: -170px;} .app-header-category .sidebar-item ul #MoreDivsec ul li{float: left;padding: 10px 10px 5px; clear: both;} /**************************** WP- Twitter Widget ***************************/ #wp_twitter a img{float: left; margin-right: 6%; width: 30px !important; height: 30px !important;} #wp_twitter .status, #wp_twitter .status a{font-size: 13px;} #wp_twitter .status a{color:#09F;} .slidebanner{height:190px;}
  4. hello, on click this link, i am redirecting to page-listing-category.php page. and all listing are shown there. http://domain-name/listing-category/?a=hello but i want this link as http://domain-name/listing-category/hello ... i use this code in function.php add_rewrite_tag("%a%",'([0-9]+)'); $a = get_query_var("a"); // Wordpress way add_rewrite_rule('listing-category/([0-9]+)/?$', 'index.php?page_id=page-listing-category&a=$matches[1]', 'top'); add_rewrite_tag("%a%",'([0-9]+)'); add_rewrite_rule('listing-category/([0-9]+)/?$', 'index.php?page_id=page-listing-category&a=$matches[1]', 'top'); $wp_rewrite->flush_rules(); but, problem is the above isn't working ... can anypne suggest me something on this. ?? thanks.
  5. I'm trying to not show meta for an author based on is not user_nicename. The code below only works if there is just one user - how would I add another user to the code, so their meta is not shown as well? <?php if(get_the_author_meta( 'user_nicename')!='user1') : ?><div class="author clearfix"> <div class="author-gravatar"> <?php echo get_avatar( $post->post_author, 64 ); ?> </div> <div class="author-about"> <h4> <?php if(get_the_author_meta( 'first_name') != '' && get_the_author_meta( 'last_name') != '' ) : ?> <?php the_author_meta( 'first_name'); ?> <?php the_author_meta( 'last_name'); ?> <?php else: ?> <?php the_author_meta( 'user_nicename'); ?> <?php endif; ?> </h4> <p class="author-description"><?php the_author_meta( 'description' ); ?></p> </div> </div><?php endif ?>
  6. Hello Friends, I am working as a Php Developer since last 5+ years. I have strong knowledge in Php/MySql, WordPress, Opencart and Magento. You can check my portfolio here..http://phpfreelancerszone.com/php-portfolio/ Contact Us By Email:shailpatel05@gmail.com We can help on a moments notice via Skype: shailpatel05 Thanks.
  7. Hi Guys Just to ask if do you know any code or module pluigin that i can have like this in my screenshot? (i attached it) thanks Please help i am using CMS - Wordpress, Joomla and even Drupal can any one please help me? thanks and Advance
  8. Hi all I am having problems with french characters when using a custom function to upload posts from a database into wordpress Firstly here is my code: //This gets the values that is sent to the class to create post <?php require_once('wp-content/plugins/PostAdder/index.php'); try { $host = 'localhost'; //$dbname = 'wordpress'; $dbname = 'HotelWifi'; $user = 'root'; $pass = ''; $DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8') ); } catch(PDOException $e) { echo $e->getMessage(); } $STH = $DBH->query('select * from activepropertylist'); $STH->setFetchMode(PDO::FETCH_ASSOC); while($row = $STH->fetch()) { $hotelname = ucwords(utf8_decode($row['Name'])); $city = $row['City']; $STH1 = $DBH->query('select * from wp_terms WHERE name = "' . $city . '"'); $STH1->setFetchMode(PDO::FETCH_ASSOC); while($row1 = $STH1->fetch()) { $cat = $row1['term_id']; } $tcat = array($cat); post_a_newhotel($hotelname, $tcat) ; } ?> // this is the function that fills the class and calls the wp_insert_post function <?php /* Plugin Name: POstHotel Plugin URI: http://www.hotelwifiscore.com Description: Creates post from supplied data Version: 1 Author: davegrix Author URI: http://www.hotelwifiscore.com */ require_once('wp-load.php'); class wm_mypost { var $post_title; var $post_category; } function post_a_newhotel($title, $post_cat) { if (class_exists('wm_mypost')) { $myclass = new wm_mypost(); } else { class wm_mypost { var $post_title; var $post_category; } } // initialize post object $wm_mypost = new wm_mypost(); // fill object $wm_mypost->post_title = utf8_decode($title); $wm_mypost->post_category = $post_cat; $wm_mypost->post_status = 'publish'; array_walk_recursive($wm_mypost, function (&$value) { $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); } ); wp_insert_post($wm_mypost); } ?> The string I am having problems with is 'Best Western Premier Hôtel L'Aristocrate' The result stored using the above is: Best Western Premier H?tel L'Aristocrate database is set to utf8_general_ci Can anyone shine any light on what to do?
  9. Overview: Sort unique string from an array and display results into a variable which can be echoed into jQuery to be displayed as a graph. I using Wordpress with a repeater from custom post fields plugin, code below: $repeater = get_field('treatments'); foreach( $repeater as $key => $row ) { column_id[ $key ] = $row['treatment_name']; } array_multisort( $column_id, SORT_ASC, $repeater ); foreach( $repeater as $row ) { print_r($row); } The print_r returns.. Array ( [treatment_name] => back pain [pain_level] => 4 ) Array ( [treatment_name] => back pain [pain_level] => 5 ) Array ( [treatment_name] => back pain [pain_level] => 7 ) Array ( [treatment_name] => back pain [pain_level] => 10 ) Array ( [treatment_name] => shoulder pain [pain_level] => 3 ) Array ( [treatment_name] => shoulder pain [pain_level] => 8 ) Array ( [treatment_name] => shoulder pain [pain_level] => 10 ) I wish to be able to sort the array data into a variable I can using within JS. { treatment: '1', a: 4, b: 3 }, { treatment: '2', a: 5, b: 8 }, { treatment: '3', a: 7, b: 10 }, { treatment: '4', b: 10 }, A = back pain B = shoulder pain [treatment_name] - is a text field, so I looking for every unique [treatment_name] to added for example having one treatment called 'foot ache' with the pain level of 6 would be added to the start of the list as C. e.g. { treatment: '1', a: 4, b: 3, c: 6 }, { treatment: '2', a: 5, b: 8 }, { treatment: '3', a: 7, b: 10 }, { treatment: '4', b: 10 }, I have gone over and over trying to work the logic out but seems my level of php is not up to par, so I thought no better place to asked then the people who got me this far.. Any questions please do let me know, and anyone will to help your a star..
  10. I was wondering if there is a way to switch the display of woocommerce hooks on my single product page shop. I would like to remove: add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); and replace that with my product description. Here is my Woocommerce-hooks.php file. Any help would be greatly appreciated. <?php /** * WooCommerce Hooks * * Action/filter hooks used for WooCommerce functions/templates * * @author WooThemes * @category Core * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** Template Hooks ********************************************************/ if ( ! is_admin() || defined('DOING_AJAX') ) { /** * Content Wrappers * * @see woocommerce_output_content_wrapper() * @see woocommerce_output_content_wrapper_end() */ add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); /** * Sale flashes * * @see woocommerce_show_product_loop_sale_flash() * @see woocommerce_show_product_sale_flash() */ add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); /** * Breadcrumbs * * @see woocommerce_breadcrumb() */ add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); /** * Sidebar * * @see woocommerce_get_sidebar() */ add_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); /** * Archive descriptions * * @see woocommerce_taxonomy_archive_description() * @see woocommerce_product_archive_description() */ add_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 ); /** * Products Loop * * @see woocommerce_show_messages() * @see woocommerce_result_count() * @see woocommerce_catalog_ordering() */ add_action( 'woocommerce_before_shop_loop', 'woocommerce_show_messages', 10 ); add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); /** * Product Loop Items * * @see woocommerce_show_messages() * @see woocommerce_template_loop_add_to_cart() * @see woocommerce_template_loop_product_thumbnail() * @see woocommerce_template_loop_price() * @see woocommerce_template_loop_rating() */ add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); /** * Subcategories * * @see woocommerce_subcategory_thumbnail() */ add_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10 ); /** * Before Single Products * * @see woocommerce_show_messages() */ add_action( 'woocommerce_before_single_product', 'woocommerce_show_messages', 10 ); /** * Before Single Products Summary Div * * @see woocommerce_show_product_images() * @see woocommerce_show_product_thumbnails() */ add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); /** * After Single Products Summary Div * * @see woocommerce_output_product_data_tabs() * @see woocommerce_upsell_display() * @see woocommerce_output_related_products() */ add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); /** * Product Summary Box * * @see woocommerce_template_single_title() * @see woocommerce_template_single_price() * @see woocommerce_template_single_excerpt() * @see woocommerce_template_single_meta() * @see woocommerce_template_single_sharing() */ add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 ); /** * Product Add to cart * * @see woocommerce_template_single_add_to_cart() * @see woocommerce_simple_add_to_cart() * @see woocommerce_grouped_add_to_cart() * @see woocommerce_variable_add_to_cart() * @see woocommerce_external_add_to_cart() */ add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 ); add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 ); add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 ); add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 ); /** * Pagination after shop loops * * @see woocommerce_pagination() */ add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); /** * Product page tabs */ add_filter( 'woocommerce_product_tabs', 'woocommerce_default_product_tabs' ); add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 ); /** * Checkout * * @see woocommerce_checkout_login_form() * @see woocommerce_checkout_coupon_form() * @see woocommerce_order_review() */ add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 ); add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 ); /** * Cart * * @see woocommerce_cross_sell_display() */ add_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' ); /** * Footer * * @see woocommerce_demo_store() */ add_action( 'wp_footer', 'woocommerce_demo_store' ); /** * Order details * * @see woocommerce_order_details_table() * @see woocommerce_order_details_table() */ add_action( 'woocommerce_view_order', 'woocommerce_order_details_table', 10 ); add_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 ); } /** Store Event Hooks *****************************************************/ /** * Shop Page Handling and Support * * @see woocommerce_template_redirect() * @see woocommerce_nav_menu_item_classes() * @see woocommerce_list_pages() */ add_action( 'template_redirect', 'woocommerce_template_redirect' ); add_filter( 'wp_nav_menu_objects', 'woocommerce_nav_menu_item_classes', 2, 20 ); add_filter( 'wp_list_pages', 'woocommerce_list_pages' ); /** * Logout link * * @see woocommerce_nav_menu_items() */ add_filter( 'wp_nav_menu_objects', 'woocommerce_nav_menu_items', 10, 2 ); /** * Clear the cart * * @see woocommerce_empty_cart() * @see woocommerce_clear_cart_after_payment() */ if ( get_option( 'woocommerce_clear_cart_on_logout' ) == 'yes' ) add_action( 'wp_logout', 'woocommerce_empty_cart' ); add_action( 'get_header', 'woocommerce_clear_cart_after_payment' ); /** * Disable admin bar * * @see woocommerce_disable_admin_bar() */ add_filter( 'show_admin_bar', 'woocommerce_disable_admin_bar', 10, 1 ); /** * Cart Actions * * @see woocommerce_update_cart_action() * @see woocommerce_add_to_cart_action() * @see woocommerce_load_persistent_cart() */ add_action( 'init', 'woocommerce_update_cart_action' ); add_action( 'init', 'woocommerce_add_to_cart_action' ); add_action( 'wp_login', 'woocommerce_load_persistent_cart', 1, 2 ); /** * Checkout Actions * * @see woocommerce_checkout_action() * @see woocommerce_pay_action() */ add_action( 'init', 'woocommerce_checkout_action', 20 ); add_action( 'init', 'woocommerce_pay_action', 20 ); /** * Login and Registration * * @see woocommerce_process_login() * @see woocommerce_process_registration() */ add_action( 'init', 'woocommerce_process_login' ); add_action( 'init', 'woocommerce_process_registration' ); /** * Product Downloads * * @see woocommerce_download_product() */ add_action('init', 'woocommerce_download_product'); /** * Analytics * * @see woocommerce_ecommerce_tracking_piwik() */ add_action( 'woocommerce_thankyou', 'woocommerce_ecommerce_tracking_piwik' ); /** * RSS Feeds * * @see woocommerce_products_rss_feed() */ add_action( 'wp_head', 'woocommerce_products_rss_feed' ); /** * Order actions * * @see woocommerce_cancel_order() * @see woocommerce_order_again() */ add_action( 'init', 'woocommerce_cancel_order' ); add_action( 'init', 'woocommerce_order_again' ); /** * Star Ratings * * @see woocommerce_add_comment_rating() * @see woocommerce_check_comment_rating() */ add_action( 'comment_post', 'woocommerce_add_comment_rating', 1 ); add_filter( 'preprocess_comment', 'woocommerce_check_comment_rating', 0 ); /** * Filters */ add_filter( 'woocommerce_short_description', 'wptexturize' ); add_filter( 'woocommerce_short_description', 'convert_smilies' ); add_filter( 'woocommerce_short_description', 'convert_chars' ); add_filter( 'woocommerce_short_description', 'wpautop' ); add_filter( 'woocommerce_short_description', 'shortcode_unautop' ); add_filter( 'woocommerce_short_description', 'prepend_attachment' ); add_filter( 'woocommerce_short_description', 'do_shortcode', 11 ); // AFTER wpautop() woocommerce-hooks.php
  11. As a software engineer the candidate will be part of a team that builds scalable web applications using open source technologies such as PHP, Ruby and Python. The developer will be building applications in multiple verticals for mission critical systems with high precision providing them a challenging environment to work in. The developer will also have to be a fast learner to get acquainted to the rapid changes in the technology. A. Primary Skills: · 3+ Years of experience in open source development with PHP . · Good experience with Javascript and javascript libraries like jquery. · Good understanding of Object oriented concepts. · Good understanding of programming fundamentals and design patterns. · Experience with MVC framework, Open Source, CMS. (Wordpress, joomla, drupal etc) B.Secondary Skills: · Experience in any other additional open source server side programming language like ruby or python. · Experience with client side MVC frameworks will be a plus. · Good Communication Skills . Experience : 3+ years Job / Project Experience : Development Educational Background : BE(IT/CSc), B Tech, MCA Salary Range : As per Co.Norms (based on last drawn CTC) If you are interested,drop your profile at mdthanveer20392@gmail.com
  12. Hello everyone i'm creating my first widget but i need help... The problem i'm facing is that whenever i activate the plugin it shows the success message and also shows in the widgets area but the page not showing in the correct manner... Like if page has php error then it stops loading certain parts of the page... I have attached the screenshots of the widget page... The code is shown below <?php /* Plugin Name: My First Widget Description: This is my first plugin. Plugin URI: www.abc.com Version: 1.0.2 Author: Subhomoy Goswami Author URI: www.cde.com */ class my_first_plugin extends WP_Widget { function my_first_plugin() { //parent::__construct(false,$name=__('My First Widget')); $widget_ops = array('classname'=>'example', 'description'=>__('This will just show the Title of the widget'),'id_base'=>'my_first_plugin'); $this->WP_Widget('my_first_plugin',__('My First Widget')); } /* This will be displayed in the backend of the website i.e The Admin */ public function form($instance) { if((isset($instance['name'])) && (isset($instance['email']))) { $name = $instance['name']; $email = $instance['email']; } else { $name = __('','bc_widget_title'); $email = __('','bc_widget_title'); } ?> <p>Name : <input type="text" name="<?php echo $this->get_field_name('name'); ?>" value="<?php echo $this->esc_attr($name); ?>"</p> <p>Email : <input type="text" name="<?php echo $this->get_field_name('email'); ?>" value="<?php echo $this->esc_attr($email); ?>"</p> <?php } /* This is the place where the update takes place */ public function update($new_instance, $old_instance) { $instance = $old_instance; $instance['name'] = (!empty($new_instance['name']))? strip_tags($new_instance['name']):''; $instance['email'] = (!empty($new_instance['email']))? strip_tags($new_instance['email']):''; return $instance; } /* This will be displayed in the web page*/ public function widget($args,$instance) { extract($args); echo $before_widget; $name = apply_filters('widget_title',$instance['name']); $email = empty($instance['email'])? ' ' : $instance['email']; if(!empty($instance['name'])) {echo $before_title.$name.$after_title;} echo "<p>Name =".$instance['name']."</p>"; echo "<p>Email =".$instance['email']."</p>"; echo $after_widget; } } add_action('widgets_init',function(){ register_widget('my_first_plugin'); }); ?> Any help will be greatly appreciated....
  13. I realized that my previous question wasn't clear enough so i decided to open a new thread (hopefully the old one will be removed - sorry for inconvinience). Here's my question - I got an extern html form that passes a value to some php file that is called makelist.php - The makelist.php simply analyzes the data that was sent through the $_POST method and puts all the 'right' values in one string array that is called $arrinfo - Each value there is a simple html snippet like '<a href=http://www.mywebsite.com/tes2t>testing</a>' . Now, assuming that i have an existing wordpress page which is called 'test1' for example - How can i put -all- that links (snippets) that exist in $arrinfo into a new sub page which will be like www.mywebsite.com/test1/arrinfolinks/ ? Do i need to install any wordpress plugin that will allow me to insert PHP code within posts/pages? Or is there any way to do it externally out of my php code? I can definitely put my php files in the same directory that wordpress uses so i can use wp_insert_post() for example - but i just couldn't figure yet how to create a sub page and insert all $arrinfo's content into it so it will be shown as links and not plain text of html tags.. thanks in advance..
  14. Hello, Is there any way to -remotely- insert a post to a custom wordpress URL? Assuming I have a network of 5 websites and i would like to update all of them through some form i'll build (may say - a mini CMS maybe). Site 1 - [Form for content] [submit button] Site 2 - [Form2 for content] [[submit button]] Site 3 - [Form3 for content] [submit button] ... and so on. And simply everytime i'll pust the submit button the Form3 content will go to a specific wordpress website, and same about Form2 and Form1. Thanks.
  15. Is it possible to have a WordPress website that you can do so that you can play Angry Birds on it? I searched the internet and couldn't find an answer. Also, it appears there are no plugins for it. Thanks colleagues!
  16. Hello friends, My name Stefany and I am a computer programmer. Over the past 2 years I have created 15 websites, the most prominent being: 1. Social Network for the Texas Tech University; 2. Web-shop for a 4d Go player; 3. Personal history blog; 4. Another web-shop for a Bulgarian company; 5. Homepage for a Bulgarian national newspaper; My major skills include: Front end - XHTML, CSS, JavaScript Back end - PHP, Perl, AJAX Databases - MySQL, SQLite, MariaDB CMS - WordPress Other - XML, REST, SOAP Frameworks - CodeIgniter E-Commerce platforms - OsCommerce, Magento I am truly confident to create any kind of website, web application or script. Just send me a message, thank you. Portfolio with all the websites I had created so far and my programming blog - www.dyulgerova.info Github - https://github.com/Stefany93?tab=repositories CV - www.dyulgerova.info/cv.pdf Email: stefany@dyulgerova.info Skype - age_of_empires3 Thank you very much! Stefany
  17. require_once ("paypalfunctions.php"); $PaymentOption = "PayPal"; if ( $PaymentOption == "PayPal") { // ================================== // PayPal Express Checkout Module // ================================== //'------------------------------------ //' The paymentAmount is the total value of //' the purchase. //' //' TODO: Enter the total Payment Amount within the quotes. //' example : $paymentAmount = "15.00"; //'------------------------------------ $paymentAmount = "99"; //'------------------------------------ //' The currencyCodeType //' is set to the selections made on the Integration Assistant //'------------------------------------ $currencyCodeType = "USD"; $paymentType = "Sale"; //'------------------------------------ //' The returnURL is the location where buyers return to when a //' payment has been succesfully authorized. //' //' This is set to the value entered on the Integration Assistant //'------------------------------------ $returnURL = "http://127.0.0.1/digitalgoodsexample/orderconfirm.php"; //'------------------------------------ //' The cancelURL is the location buyers are sent to when they hit the //' cancel button during authorization of payment during the PayPal flow //' //' This is set to the value entered on the Integration Assistant //'------------------------------------ $cancelURL = "http://127.0.0.1/digitalgoodsexample/cancel.php"; //'------------------------------------ //' Calls the SetExpressCheckout API call //' //' The CallSetExpressCheckout function is defined in the file PayPalFunctions.php, //' it is included at the top of this file. //'------------------------------------------------- $items = array(); $items[] = array('name' => 'PayPal Digital Goods Integration Guide', 'amt' => $paymentAmount, 'qty' => 1); //::ITEMS:: // to add anothe item, uncomment the lines below and comment the line above // $items[] = array('name' => 'Item Name1', 'amt' => $itemAmount1, 'qty' => 1); // $items[] = array('name' => 'Item Name2', 'amt' => $itemAmount2, 'qty' => 1); // $paymentAmount = $itemAmount1 + $itemAmount2; // assign corresponding item amounts to "$itemAmount1" and "$itemAmount2" // NOTE : sum of all the item amounts should be equal to payment amount $resArray = SetExpressCheckoutDG( $paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $items ); $ack = strtoupper($resArray["ACK"]); if($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { $token = urldecode($resArray["TOKEN"]); RedirectToPayPalDG( $token ); } else { //Display a user friendly Error on the page using any of the following error information returned by PayPal $ErrorCode = urldecode($resArray["L_ERRORCODE0"]); $ErrorShortMsg = urldecode($resArray["L_SHORTMESSAGE0"]); $ErrorLongMsg = urldecode($resArray["L_LONGMESSAGE0"]); $ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]); echo "SetExpressCheckout API call failed. "; echo "Detailed Error Message: " . $ErrorLongMsg; echo "Short Error Message: " . $ErrorShortMsg; echo "Error Code: " . $ErrorCode; echo "Error Severity Code: " . $ErrorSeverityCode; } }<code>I am using the above paypal function to send users to paypal for payment. However, I would like to automatically insert the product price on the line:</code>$paymentAmount = "99"<code>instead of numeric value using a meta value that is:</code>echo get_post_meta($post->ID, 'download_info_price', true I am have been perfectly able to make the paypal functions work, but only with numeric value by using it as a template page for my checkout page. I believe that I need something that help me echo meta value outside of the loop and using:`global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'Your-Custom-Field', true);`did not get me anywhere. with the above, I tried calling /wp-load.php in the paypal functions, but no result. The price/amount I want to automate is require by my paypal checkout file that is called on the header of above codesrequire_once ("paypalfunctions.php")the paypal checkout is:`/******************************************** PayPal API Module Defines all the global variables and the wrapper functions ********************************************/ $PROXY_HOST = '127.0.0.1'; $PROXY_PORT = '808'; $SandboxFlag = true; //' TODO: //'------------------------------------ //' PayPal API Credentials //' Replace <API_USERNAME> with your API Username //' Replace <API_PASSWORD> with your API Password //' Replace <API_SIGNATURE> with your Signature //'------------------------------------ $API_UserName=//this is hidden; $API_Password=//this is hidden; $API_Signature=//this is hidden; // BN Code is only applicable for partners $sBNCode = "PP-ECWizard"; /* ' Define the PayPal Redirect URLs. ' This is the URL that the buyer is first sent to do authorize payment with their paypal account ' change the URL depending if you are testing on the sandbox or the live PayPal site ' ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token= */ if ($SandboxFlag == true) { $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; $PAYPAL_URL = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; $PAYPAL_DG_URL = "https://www.sandbox.paypal.com/incontext?token="; } else { $API_Endpoint = "https://api-3t.paypal.com/nvp"; $PAYPAL_URL = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; $PAYPAL_DG_URL = "https://www.paypal.com/incontext?token="; } $USE_PROXY = false; $version = "84"; /* An express checkout transaction starts with a token, that identifies to PayPal your transaction In this example, when the script sees a token, the script knows that the buyer has already authorized payment through paypal. If no token was found, the action is to send the buyer to PayPal to first authorize payment */ /* '------------------------------------------------------------------------------------------------------------------------------------------- ' Purpose: Prepares the parameters for the SetExpressCheckout API Call for a Digital Goods payment. ' Inputs: ' paymentAmount: Total value of the shopping cart ' currencyCodeType: Currency code value the PayPal API ' paymentType: paymentType has to be one of the following values: Sale or Order or Authorization ' returnURL: the page where buyers return to after they are done with the payment review on PayPal ' cancelURL: the page where buyers return to when they cancel the payment review on PayPal '-------------------------------------------------------------------------------------------------------------------------------------------- */ function SetExpressCheckoutDG( $paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $items) { //------------------------------------------------------------------------------------------------------------------------------------ // Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation $nvpstr = "&PAYMENTREQUEST_0_AMT=". $paymentAmount; $nvpstr .= "&PAYMENTREQUEST_0_PAYMENTACTION=" . $paymentType; $nvpstr .= "&RETURNURL=" . $returnURL; $nvpstr .= "&CANCELURL=" . $cancelURL; $nvpstr .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $currencyCodeType; $nvpstr .= "&REQCONFIRMSHIPPING=0"; $nvpstr .= "&NOSHIPPING=1"; foreach($items as $index => $item) { $nvpstr .= "&L_PAYMENTREQUEST_0_NAME" . $index . "=" . urlencode($item["name"]); $nvpstr .= "&L_PAYMENTREQUEST_0_AMT" . $index . "=" . urlencode($item["amt"]); $nvpstr .= "&L_PAYMENTREQUEST_0_QTY" . $index . "=" . urlencode($item["qty"]); $nvpstr .= "&L_PAYMENTREQUEST_0_ITEMCATEGORY" . $index . "=Digital"; } //'--------------------------------------------------------------------------------------------------------------- //' Make the API call to PayPal //' If the API call succeded, then redirect the buyer to PayPal to begin to authorize payment. //' If an error occured, show the resulting errors //'--------------------------------------------------------------------------------------------------------------- $resArray = hash_call("SetExpressCheckout", $nvpstr); $ack = strtoupper($resArray["ACK"]); if($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { $token = urldecode($resArray["TOKEN"]); $_SESSION['TOKEN'] = $token; } return $resArray; } /* '------------------------------------------------------------------------------------------- ' Purpose: Prepares the parameters for the GetExpressCheckoutDetails API Call. ' ' Inputs: ' None ' Returns: ' The NVP Collection object of the GetExpressCheckoutDetails Call Response. '------------------------------------------------------------------------------------------- */ function GetExpressCheckoutDetails( $token ) { //'-------------------------------------------------------------- //' At this point, the buyer has completed authorizing the payment //' at PayPal. The function will call PayPal to obtain the details //' of the authorization, incuding any shipping information of the //' buyer. Remember, the authorization is not a completed transaction //' at this state - the buyer still needs an additional step to finalize //' the transaction //'-------------------------------------------------------------- //'--------------------------------------------------------------------------- //' Build a second API request to PayPal, using the token as the //' ID to get the details on the payment authorization //'--------------------------------------------------------------------------- $nvpstr="&TOKEN=" . $token; //'--------------------------------------------------------------------------- //' Make the API call and store the results in an array. //' If the call was a success, show the authorization details, and provide //' an action to complete the payment. //' If failed, show the error //'--------------------------------------------------------------------------- $resArray=hash_call("GetExpressCheckoutDetails",$nvpstr); $ack = strtoupper($resArray["ACK"]); if($ack == "SUCCESS" || $ack=="SUCCESSWITHWARNING") { return $resArray; } else return false; } /* '------------------------------------------------------------------------------------------------------------------------------------------- ' Purpose: Prepares the parameters for the GetExpressCheckoutDetails API Call. ' ' Inputs: ' sBNCode: The BN code used by PayPal to track the transactions from a given shopping cart. ' Returns: ' The NVP Collection object of the GetExpressCheckoutDetails Call Response. '-------------------------------------------------------------------------------------------------------------------------------------------- */ function ConfirmPayment( $token, $paymentType, $currencyCodeType, $payerID, $FinalPaymentAmt, $items ) { /* Gather the information to make the final call to finalize the PayPal payment. The variable nvpstr holds the name value pairs */ $token = urlencode($token); $paymentType = urlencode($paymentType); $currencyCodeType = urlencode($currencyCodeType); $payerID = urlencode($payerID); $serverName = urlencode($_SERVER['SERVER_NAME']); $nvpstr = '&TOKEN=' . $token . '&PAYERID=' . $payerID . '&PAYMENTREQUEST_0_PAYMENTACTION=' . $paymentType . '&PAYMENTREQUEST_0_AMT=' . $FinalPaymentAmt; $nvpstr .= '&PAYMENTREQUEST_0_CURRENCYCODE=' . $currencyCodeType . '&IPADDRESS=' . $serverName; foreach($items as $index => $item) { $nvpstr .= "&L_PAYMENTREQUEST_0_NAME" . $index . "=" . urlencode($item["name"]); $nvpstr .= "&L_PAYMENTREQUEST_0_AMT" . $index . "=" . urlencode($item["amt"]); $nvpstr .= "&L_PAYMENTREQUEST_0_QTY" . $index . "=" . urlencode($item["qty"]); $nvpstr .= "&L_PAYMENTREQUEST_0_ITEMCATEGORY" . $index . "=Digital"; } /* Make the call to PayPal to finalize payment If an error occured, show the resulting errors */ $resArray=hash_call("DoExpressCheckoutPayment",$nvpstr); /* Display the API response back to the browser. If the response from PayPal was a success, display the response parameters' If the response was an error, display the errors received using APIError.php. */ $ack = strtoupper($resArray["ACK"]); return $resArray; } /** '------------------------------------------------------------------------------------------------------------------------------------------- * hash_call: Function to perform the API call to PayPal using API signature * @methodName is name of API method. * @nvpStr is nvp string. * returns an associtive array containing the response from the server. '------------------------------------------------------------------------------------------------------------------------------------------- */ function hash_call($methodName,$nvpStr) { //declaring of global variables global $API_Endpoint, $version, $API_UserName, $API_Password, $API_Signature; global $USE_PROXY, $PROXY_HOST, $PROXY_PORT; global $gv_ApiErrorURL; global $sBNCode; //setting the curl parameters. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$API_Endpoint); curl_setopt($ch, CURLOPT_VERBOSE, 1); //turning off the server and peer verification(TrustManager Concept). curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POST, 1); //if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled. //Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php if($USE_PROXY) curl_setopt ($ch, CURLOPT_PROXY, $PROXY_HOST. ":" . $PROXY_PORT); //NVPRequest for submitting to server $nvpreq="METHOD=" . urlencode($methodName) . "&VERSION=" . urlencode($version) . "&PWD=" . urlencode($API_Password) . "&USER=" . urlencode($API_UserName) . "&SIGNATURE=" . urlencode($API_Signature) . $nvpStr . "&BUTTONSOURCE=" . urlencode($sBNCode); //setting the nvpreq as POST FIELD to curl curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq); //getting response from server $response = curl_exec($ch); //convrting NVPResponse to an Associative Array $nvpResArray=deformatNVP($response); $nvpReqArray=deformatNVP($nvpreq); $_SESSION['nvpReqArray']=$nvpReqArray; if (curl_errno($ch)) { // moving to display page to display curl errors $_SESSION['curl_error_no']=curl_errno($ch) ; $_SESSION['curl_error_msg']=curl_error($ch); //Execute the Error handling module to display errors. } else { //closing the curl curl_close($ch); } return $nvpResArray; } /*'---------------------------------------------------------------------------------- Purpose: Redirects to PayPal.com site. Inputs: NVP string. Returns: ---------------------------------------------------------------------------------- */ function RedirectToPayPal ( $token ) { global $PAYPAL_URL; // Redirect to paypal.com here $payPalURL = $PAYPAL_URL . $token; header("Location: ".$payPalURL); exit; } function RedirectToPayPalDG ( $token ) { global $PAYPAL_DG_URL; // Redirect to paypal.com here $payPalURL = $PAYPAL_DG_URL . $token; header("Location: ".$payPalURL); exit; } /*'---------------------------------------------------------------------------------- * This function will take NVPString and convert it to an Associative Array and it will decode the response. * It is usefull to search for a particular key and displaying arrays. * @nvpstr is NVPString. * @nvpArray is Associative Array. ---------------------------------------------------------------------------------- */ function deformatNVP($nvpstr) { $intial=0; $nvpArray = array(); while(strlen($nvpstr)) { //postion of Key $keypos= strpos($nvpstr,'='); //position of value $valuepos = strpos($nvpstr,'&') ? strpos($nvpstr,'&'): strlen($nvpstr); /*getting the Key and Value values and storing in a Associative Array*/ $keyval=substr($nvpstr,$intial,$keypos); $valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1); //decoding the respose $nvpArray[urldecode($keyval)] =urldecode( $valval); $nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr)); } return $nvpArray; }
  18. Hello. Im new to this forum. So hi everyone. ^^ Im wondering if you guys could tell me how could i add content from this Link on to the front site of my page (which is wordpress) www.zapumpo.si. Thank you to everyone wholl try to help!
  19. I'm currently working on a WordPress website project and I am hoping someone can help me out on this. In the registration page, the data entered is stored into the WordPress database. I've also build a connection to store those data into an external database as well. So basically, If a visitor registers on the site, their data info is stored in the WP and external DB. My question is since the external DB relies on checking to see if the submit button has been pressed, do those data input values need to be escaped to prevent sql injection into the external DB since the data submitted to WordPress has already been sql escaped? Thanks for helping.
  20. I would like someone to please help look over these lines of codes and help me correct what's wrong with it. The first problem I found out on my registration form is when a user fills out a portion of the form, the WordPress client side and server side validation works as intended but that data gets processed/stored into my external database which it is not suppose to. So what I did to prevent it check if the user pressed the submit button, if it's pressed, check to see if the values aren't empty. If the values are empty, do something and stop the connection but If the values are not empty, run the connection to the external DB using the try/catch statement. I tested it out again and the validation works as intended, no data was processed but when the user completes the registration form correctly, their info gets stored into the WordPress DB but not my external database. Can anyone please help me with this issue? <?php $firstname = esc_attr($_POST['fname']); $lastname= esc_attr($_POST['lname']); $email= esc_attr($_POST['email']); ... $error = false; $required = array($firstname, $lastname, $email ...); if (!isset($_POST['on-reg-submit'])) { // Do nothing } else { foreach($required as $val) { if (empty($_POST[$val])) { $error = true; } } if ($error) { // If errors, prevent from submmiting to external DB } else { // No errors try { // Here is where I connect to the external DB // processing the posts values into it and storing the post values into my external DB } catch { echo "ERROR!"; } } ....
  21. i tried to search but can't get satisfy.what is the exact difference b/w shopping cart and e-commerce website.Thanks in advance.....
  22. Hi, I'm working on a reset password for WordPress and I'm stumped on this query. What the query does is when a user requests a password reset, the query makes an update to the user's password and activation key. When I run this query, it's giving me int(0) which is saying there are no rows affected. I ran a var_dump on each POST variables to check if the values are correct and it is, so I'm not sure where the error is coming from this sql statement. $resetQuery = $wpdb -> query($wpdb -> prepare("UPDATE wp_users SET user_pass = %s, user_activation_key = '' WHERE user_login = %s AND user_activation_key = %s" , $hashedPwd , $usernameemail, $key)); If anyone can please assist me, that would be great! -Halben
  23. Below is the code for my Latest post Widget, I want to configure the widget to exclude 4 previous post and add paginationat the bottom instead of the load more function. I know that <?php query_posts('posts_per_page=12&offset=4'); if(have_posts():while (have_posts(): the_post()p ?> will work. I need to configure the below code to allow me to exclude posts and not loadmore. Thanks In advanced! --------------------------------------------------------------------------------- <?php class wpShowerIndexLatestEntriesWidget extends WP_Widget { function __construct() { parent::__construct( 'wpshower_index_latest_entries', 'Homepage Latest Entries', array('description' => __('Widget for displaying latest entries', 'outspoken')) ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { extract($args); $limit = $instance['limit']; $options = array( 'posts_per_page' => $limit + 1 ); $exclude = wpShower::getIndexPosts('exclude'); if (!empty($exclude)) $options['exclude'] = implode(',', $exclude); $posts = get_posts($options); $title = apply_filters('widget_title', $instance['title']); echo $before_widget.$before_title.$title.$after_title; if (empty($posts)) { echo '<div class="outspoken-error">'; if (is_admin_bar_showing()) { printf(__('No posts to show, please <a href="%s">add one</a>', 'outspoken'), admin_url('edit.php')); } else { _e('No posts to show', 'outspoken'); } echo '</div>'.$after_widget; return; } global $post; $show_categories = get_theme_mod('outspoken_home_categories'); for ($i = 0; $i < $limit; $i++): if (!isset($posts[$i])) break; $post = $posts[$i]; setup_postdata($post); $image = outspoken_post_image($post->ID, 'post-thumbnail'); ?> <article> <a href="<?php the_permalink(); ?>"><img src="<?php echo esc_url($image); ?>" alt="<?php the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>" /></a> <div> <?php if ($show_categories): ?> <div class="meta-top"><?php outspoken_entry_categories(); ?></div> <?php endif; ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php $meta = outspoken_index_meta(false, false); if ($meta != ''): ?> <div class="meta"><?php echo $meta; ?></div> <?php endif; ?> <div class="summary"><?php the_excerpt(); ?></div> </div> </article> <?php endfor; wp_reset_postdata(); if (isset($posts[$limit])): ?> <div class="load-more"><span class="loader"></span><span class="text">Load More Posts</span></div> <script type="text/javascript"> jQuery(function() { var latest_entries_limit = <?php echo $limit; ?>; var latest_entries_offset = latest_entries_limit; jQuery('#<?php echo $args['widget_id']; ?>').on('click', '.load-more', function() { if (latest_entries_offset == 0) return; jQuery(this).addClass('active'); jQuery.ajax({ type: 'post', dataType: 'json', url: '<?php echo admin_url('admin-ajax.php?action=wpshower_latest_entries'); ?>', data: { limit: latest_entries_limit, offset: latest_entries_offset }, success: function(response) { for (var i = 0; i < response.posts.length; i++) { jQuery('#<?php echo $args['widget_id']; ?> .load-more').before( '<article>' + '<a href="' + response.posts[i].permalink + '"><img src="' + response.posts[i].image + '" alt="' + response.posts[i].title + '" title="' + response.posts[i].title + '" /></a>' + '<div>' + '<div class="meta-top">' + response.posts[i].categories + '</div>' + '<h2><a href="' + response.posts[i].permalink + '">' + response.posts[i].title + '</a></h2>' + '<div class="meta">' + response.posts[i].date + response.posts[i].comments + '</div>' + '<div class="summary">' + response.posts[i].excerpt + '</div>' + '</div>' + '</article>' ); } if (response.more) { latest_entries_offset += latest_entries_limit; jQuery('#<?php echo $args['widget_id']; ?> .load-more').removeClass('active'); } else { latest_entries_offset = 0; jQuery('#<?php echo $args['widget_id']; ?> .load-more').hide(); } if (scroll != false) scroll.loadMore(); } }); }); }); </script> <?php endif; echo $after_widget; } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form($instance) { if (isset($instance['title'])) $title = $instance['title']; else $title = __('Latest Entries', 'outspoken'); if (isset($instance['limit'])) $limit = $instance['limit']; else $limit = 4; ?> <p> <label for="<?php echo $this->get_field_name('title'); ?>"><?php _e('Title:', 'outspoken'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> </p> <p> <label for="<?php echo $this->get_field_name('limit'); ?>"><?php _e('How many items:', 'outspoken'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="text" value="<?php echo $limit; ?>" /> </p> <?php } /** * Sanitize widget form values as they are saved. * * @see WP_Widget::update() * * @param array $new_instance Values just sent to be saved. * @param array $old_instance Previously saved values from database. * * @return array Updated safe values to be saved. */ public function update($new_instance, $old_instance) { $instance = array(); $instance['title'] = !empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; $instance['limit'] = !empty($new_instance['limit']) ? intval($new_instance['limit']) : 4; return $instance; } }
  24. I am a WP and PHP novice still flailing in the deep end of the pool. I am trying to add some logic to display content on certain pages (via WP templates), not on others. I've made some progress but having issues. Here is the plan: On certain pages with an post type of "EVENT" I want content to appear, but not on OTHER pages with an post type of "EVENT". The problem I am running into is that part of the content is appearing on ALL event pages even if they don't meet the criteria. The logic is intended to be this: If the page is post_type "EVENT", AND if the indicated table contains a field with a record CAT which matches the current "POST ID", AND contains a record TYPE which matches value "1", display table cells which contain text "Presented by: ", an href and an image, else display table cells which contain a nonbreaking space. The problem is that the text "Presented by: " is appearing on ALL the even pages, regardless of whether they meet the criteria or not -- which would tend to indicate a problem with the logic code -- but by the same token the href and image are correctly appearing ONLY on the pages that meet the criteria and are NOT appearing on along with the rogue text on pages which do not meet the criteria. I am sure it is a coding error on my part but I am not sure what. ANY help anyone could give would be GREATLY appreciated. The code involved is below (oh, and I should mention that the code in question is in the HEADER.PHP file): <?php if($post->post_type=='event') { $q1=mysql_query("SELECT * FROM table_name WHERE type = 1 AND cat = $post->ID "); $row_diamond=mysql_fetch_object($q1); if ($q1){ ?> <td width="115" align="right" valign="middle" id="diamond1"><strong style="position:relative;bottom:-25px;">Presented by: </strong></td> <td id="diamond2" width="190"> <a href="<?=$row_diamond->website?>" title="<?=$row_diamond->website_title?>" target="_blank" style="cursor:pointer;"><img style="position:relative;bottom:5px;" src="<?php bloginfo('siteurl'); ?>/wp-content/plugins/sean_event/files/<?=$row_diamond->image?>" alt="<?=$row_diamond->alt_text?>"border="0"></a> <br /> </td> <?php } else{ ?> <td width="115" align="right" valign="middle" id="diamond1"> </td> <td id="diamond2" width="190"> </td> <?php } } ?>
  25. Working on a WordPress site. I've been again thrown into the deep end of the pool on this. I am trying to add some code to the HEADER.PHP file which will display content under certian conditions. Here's the code in question: $q1=mysql_query("SELECT * FROM 'wp_sean_sponsors' WHERE 'type' LIKE 1 AND 'cat'='.$post->ID.' "); $row_diamond=mysql_fetch_object($q1); if ($q1){ ?> The problem is that there doesn't seem to be anything coming back from the database. When I do a var_dump of $q1 it comes back as boolen(false), which I am taking to mean it has no value. But I know that a record which matches the criteria exists. I tried replacing '.$post->ID.' with a hard value with no change. I've got no clue where to go next but they're beating me until I come up with a solution.
×
×
  • 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.