Search Results

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

Page 51/308 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Wordpress Shortcode in Theme, Trying to use Gallery

    - by Akash Kava
    We are using SuperSlidShow Plugin to display gallery of images in our post. However when I write shortcode [gallery] in my post/page images appear correctly, but can anyone guide me if I want to fix this [gallery] shortcode in the theme itself like page.php/post.php so that images will appear on all pages. We have images for every page/post.

    Read the article

  • fetching rss feed, mktime problem (wordpress plugin)

    - by krike
    sorry for the weird question but actually I'm not sure how to ask this. the code works fine but the problem is the following. I fetch items from feeds and compare them to a specific date which is stored into the database as an option. I see if the fetched item is more recent or not and if it is I create a new pending post. however there is one item that just keeps being added because there is something wrong with the date and I don't understand what is wrong because all other items (before and after) are blocked once they are being added as post (so when they are not recent anymore compared with the date I store as an option) I then echo'ed that line and this is the result: yes it exist! 27-03-2010-04-03 Free Exclusive Vector Icon Pack: Web User Interface 29-01-2010-03-01 if(1330732800 < 1335830400) 01 05 2012 the first line is to see if the option still exist and what data was stored in it the second is the actual items that's causing all the problem, it's initial date is less recent then the date but still passes as more recent.... this is the code I use, any help would be great: if(!get_option('feed_last_date')): echo "nope doesn't exist, but were creating one"; $time = time()-60*60*24*30*3; add_option("feed_last_date", date('d-m-Y-h-m', $time)); else: echo "yes it exist! ".get_option('feed_last_date'); endif; //Create new instance of simple pie and pass in feed link $feed = new SimplePie($feeds); //Call function handle_content_type() $feed->handle_content_type(); $last_date = explode("-", get_option('feed_last_date')); $day = $last_date[0]; $month = $last_date[1]; $year = $last_date[2]; $hour = $last_date[3]; $minute = $last_date[4]; $last_date = mktime(0,0,0, $day, $month, $year); //4 - Loop through received items foreach($feed->get_items(0, 500) as $item) : $feed_date = explode("-", $item->get_date('d-m-Y-h-m')); $day = $feed_date[0]; $month = $feed_date[1]; $year = $feed_date[2]; $hour = $feed_date[3]; $minute = $feed_date[4]; $feed_date = mktime(0,0,0,$day, $month, $year); if($last_date < $feed_date): echo $item->get_title()." ". $item->get_date('d-m-Y-h-m') ." if(".$last_date." < ".$feed_date.") <b>".date("d m Y", $feed_date)."</b><br />"; //if datum is newer then stored in database, then create new post $description = "<h3>download the resource</h3><p><a href='".$item->get_permalink()."' target='_blank'>".$item->get_permalink()."</a></p><h3>Resource description</h3><p>".$item->get_description()."</p>"; $new_post = array( 'post_title' => $item->get_title(), 'post_content' => $description, 'post_status' => 'pending', 'post_date' => date('Y-m-d H:i:s'), 'post_author' => $user_ID, 'post_type' => 'post', 'post_category' => array(0) ); $post_id = wp_insert_post($new_post); endif; endforeach; update_option("feed_last_date", date('d-m-Y-h-m', time()));

    Read the article

  • Display Wordpress parent Category with their child category

    - by saorabh
    Hi, I want to display only those the parent category which have some child category with their child category without using child_of= I was trying to display but i am only able to get the list of child category not their parent category name. <?php $querystr = "SELECT wp_terms.name, wp_terms.term_id, wp_terms.name FROM wp_terms, wp_term_taxonomy WHERE wp_terms.term_id = wp_term_taxonomy.term_id AND wp_term_taxonomy.parent !=0 "; $cat_child = $wpdb->get_results($querystr, OBJECT); var_dump($cat_child); foreach ($cat_child as $category) { echo $category->name. ' , '; } ?> Help me.. Thanks

    Read the article

  • WordPress SQL Query on Category/Terms

    - by mroggle
    Hi, i am modifying a plugin slightly to meet my needs, and need to change this query to return post ID's of just one category. I know it has something to do with INNER JOIN, but cant get the query right. Here is the original query $query = "SELECT ID as PID FROM $wpdb->posts"; $results = $wpdb->get_results($querydetails,ARRAY_A);

    Read the article

  • conditionals in wordpress

    - by pablo
    Why this code works fine: <?php if (**is_page**('4')) { ?> <style type="text/css"> body {background-image:url("<?php bloginfo('template_url'); ?>/images/bac4.jpg");} </style> <?php } else ?> and this not: <?php if (**is_category**()) { ?> <style type="text/css"> body {background-image:url("<?php bloginfo('template_url'); ?>/images/coaching.jpg");} </style> <?php } else ?>

    Read the article

  • wordpress -> showing custom data from child pages + pagination

    - by GaVrA
    Hello! You can see here what i am doing: http://www.arvag.net/otkrijte-svet/leto/ So its pulling 2 custom fields from child pages, one of them is just url for the image on the left, and the other field is that text showing on the right. Now, what i want to do is to add pagination there. The code i have now will just simply show all child pages, but i want to show only 5 child pages, so if user want to see 6th child page he would have to click on link for "Page 2" and so on. The code im using to display these child pages is this: <?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_title&sort_order=desc'); $count = 0; foreach($pages as $page) { $short_info = get_post_meta($page->ID,'info',true); $image = get_post_meta($page->ID,'slika',true); $count++; ?> <div class='preview_slika left'><img src="<?php echo $image ?>" alt="<?php echo $page->post_title ?>" /></div> <div class='preview_info right'> <h2><?php echo $page->post_title ?></h2> <p><?php echo $short_info ?></p> <a href="<?php echo get_page_link($page->ID) ?>">Više o >></a> </div> <div class='clear'></div> <?php } ?> So any idea what to do to get what i need?

    Read the article

  • WordPress: Using a Where Clause With A Custom Field

    - by Steve Wilkison
    I have a bunch of events that are listed on a particular page. Each event is a post. I need them to display in the order in which they occur, NOT the order of the posting date. So, I've created a custom field called TheDate and enter in the date in this format for each one: 20110306. Then, I wrote my query like this: query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); Works perfectly and displays the events in the correct order. However, I also want it to ONLY display dates from today onward. I don't want it to display dates which have passed. It seems the way to do this is with a "filter." I tried this, but it doesn't work. $todaysdate = date('Ymd'); query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); function filter_where( $where = '' ) { $where .= "meta_value_num >= $todaysdate"; return $where; } add_filter( 'posts_where', 'filter_where' ); I figure it's just a matter of where I'm using this filter, I probably have it in the wrong place. Or maybe the filter itself is bad. Any help or guidance would be greatly appreciated. Thanks!

    Read the article

  • Wordpress - Get Post Number in a Category

    - by Rfvgyhn
    Is there a way for me to get a pseudo-ID of a post from the category it belongs to? Let's say I have these posts post_id | post_title | post_cat --------+------------+--------- 0 | a post | cat1 1 | a post1 | cat2 2 | a post2 | cat1 3 | a post3 | cat2 ... 57 | a post57 | cat2 I want the posts from cat2 and the posts' ids to be relative to the category they were posted in. Something like post_id | post_title | post_cat | cat_post_id --------+------------+----------+-------- 1 | a post1 | cat2 | 1 3 | a post3 | cat2 | 2 57 | a post57 | cat2 | 3

    Read the article

  • Wordpress is_front_page if statement

    - by Anders Kitson
    I have the following code below. I am trying to get rid of the box articles div when I am on the home page the code works when the html is outside of the else portion of the IF statement, as soon as I put it inside the page goes blank, I can't seem to figure out where I have broken the code. Any help would be great. <?php if(is_front_page()) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } else{ ?> <div class="box articles"> <div class="block" id="articles"> <h2><?php the_title(); ?></h2> <div class="article"> <div class="entry"> <?php the_content(); ?> </div> <?php edit_post_link('Modifca Contenuto.', '<p>', '</p>'); ?> </div> </div> </div> <?php endwhile; endif; ?> <? } ?>

    Read the article

  • (Wordpress) Global variable to detect pagination?

    - by Gnee
    I am showing 6 posts on one page. On the 7th post, pagination occurs on so on. goal: If there is more than one page (page 1, 2, 3, etc..), JavaScript is to add a specific div element. If there are only 6 posts or less, no pagination occurs, no div element is added. The number of posts to show: $showposts = get_query_var('showposts'); The current post number I can keep track of: $post_count++; Problem is I can keep track of posts 1-6 but how to tell if if it goes over to 7 and starts pagination? I thought there was a global variable that returns if pagination occurs, but I can't seem to find it. (I know there is global to detect pagination via <!--nextpage--> but so far I can't find it's equivalent for index.php).

    Read the article

  • wordpress php > div issue

    - by Philip Bateman
    Thanks in advance for you help Ive been doing this as a lovejob for friends and now im getting quotes of several hundred dollars for minor homepage variation and I'm not sure if its valid. I'm not a programmer myself, just trying hard :) Via the CafePress press75 theme, I'm trying to go from 1 / 2 / 3 column home layout, to 1-2 merged and 3, push the 2nd column data to the right and have the 1st column span as a 16:9 gallery (nextgengallery plugin installed). Is this really a complex thing from a coding perspective? The current guy talking to me is saying its going to cost $700 or 800 AUD to alter, which is rough when the template cost $85.. From this http://shocolate.com.au.previewdns.com/wp-content/uploads/2010/05/shocolatecurrent.jpg to this 'url+Shocolatelooklikethis.jpg' I was able to get the sidebar removed by taking out ‘‘ near the bottom of home.css.. Just can’t get the middle data to flow over it? This would be ideal as a result, as the system puts the latest selected blog post on the homepage, so if we can get rid of the sidebar div and have the text appear where it was, that would be ideal. Removing the sidebar from the bottom of home.php and setting the thumbnail width to say 450 gives me the result im after EXCEPT the text doesn’t fill where the sidebar is, it wraps underneath. Reference 'shocolate.com.au.previewdns.com' for current site Thank you!!! Phil (Melbourne)

    Read the article

  • Wordpress loop not showing 'else' when no posts exist

    - by Reuben
    When no posts exist I'm used to seeing the message after the else, and I'm not sure why it's not showing it now? Code: <?php $args = array( 'post_type' => 'event', 'posts_per_page' => 1, 'post_status' => 'future', 'order' => 'ASC' ); $loop = new WP_Query( $args ); if ( have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <div class="event_preview_title"><?php the_title(); ?></div> <div class="event_details"> <div class="event_date"><?php the_time('m/d/y'); ?></div> <div class="event_time"><?php the_time('g:i A'); ?></div> </div> <?php the_post_thumbnail( array(65,65) ); ?> <a class="clickthrough" href="<?php bloginfo('wpurl'); ?>/events"></a> <?php endwhile; else: ?> <p>Bluebird Books may be coming soon to a neighborhood near you!<br /> We are currently on hiatus planning our next season's schedule. New tour dates will be posted to this page once confirmed. Meanwhile, inquiries about appearances and programs are welcomed! If you are interested in having Bluebird visit your business, school, or special event, please contact us.</p> <?php endif; ?> Thanks!

    Read the article

  • Wordpress show next 3 x number adjacent custom posts from existing

    - by user2463284
    On a single/detail Custom Post Page I would like to display a custom nav of li's or divs in a sidebar that displays both title, excerpt and permalink for the next 3 posts within the custom post series. So if we are on custom post 3 then it would show 4, 5, 6 in the sidebar. The closest I've found to this is :-= global $post; $current_post = $post; // remember the current post for($i = 1; $i <= 3; $i++){ $post = get_previous_post(); // this uses $post->ID setup_postdata($post); // do your stuff here the_title(); } $post = $current_post; // restore Problem is this only shows the first next post and I need to show 3. Thanks Glennyboy

    Read the article

  • Wordpress Custom Query

    - by InnateDev
    I have posts that use a custom field for start date and end date. Query_posts returns an array of posts that exist in the category I'm filtering. How do I query posts using this custom field that has date i.e. 03/11/2010 and not the full array. Pagination works on the full array so it returns all posts. I can use an if else to only show the posts newer that today, then pagination doesn't work. Would I have to build a custom mysql query?

    Read the article

  • wordpress mu image speed problem

    - by InnateDev
    I have an mu install with the typical blogs.dir folder storing files for each blog. When loading these images however they take forever to appear, but they eventually do. It seems that wpmu uses php to serve each image which is ludicrous. When using images from the same domain but in a root folder, the images are displayed quickly. Is there a workaround the blogs.php for rendering files? Could there be something else wrong in the settings of my install?

    Read the article

  • Get Category in Wordpress Post

    - by Adam Beaumont
    OK I have a standard post here: http://www.ticketyoda.co.uk/concerts/rihanna-tickets/rihanna-tickets-manchester-2013-06-12-united-kingdom/970 I am trying to make each post unique and contain the category information for both the city (Manchester) and the Artist (Rihanna). At the moment the box underneath the venue contains the information taken from the category (see breadcrumb). So I have 1 out of 2. What I need now is for an extra box below to show the category information for the Artist. I use : <?php $category = get_the_category(); echo $category[0]->category_description; ?> to get the first category. You can see the rihanna description under the posts here: http://www.ticketyoda.co.uk/concerts/rihanna-tickets/ Any help appreciated.

    Read the article

  • ampersand problem with wordpress categories

    - by InnateDev
    I have an array of categories, some with an & i.e. events & entertainment. My script imports these categories and gets the ID of each using its name. i.e.: $cat_id = array(get_cat_id($linearray[0]),get_cat_id($linearray[1]),get_cat_id($linearray[2]),get_cat_id($linearray[3])); My script then adds a post to wp using these category ID's. My problem is that categories from my import with the & are not imported. These same categories (when an email notice is sent) break the email at the &. Is there a simple workaround to this?

    Read the article

  • Wordpress is_front_page if statment

    - by Anders Kitson
    I have the following code below. I am trying to get rid of the box articles div when I am on the home page the code works when the html is outside of the else portion of the IF statement, as soon as I put it inside the page goes blank, I can't seem to figure out where I have broken the code. Any help would be great. <?php if(is_front_page()) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } else{ ?> <div class="box articles"> <div class="block" id="articles"> <h2><?php the_title(); ?></h2> <div class="article"> <div class="entry"> <?php the_content(); ?> </div> <?php edit_post_link('Modifca Contenuto.', '<p>', '</p>'); ?> </div> </div> </div> <?php endwhile; endif; ?> <? } ?>

    Read the article

  • Wordpress menu issue on IE!

    - by Joann
    So I am building a site for a client. The problem is the menu I made doesn't work on IE. Here's the site: http://robertnogueira.com You'll see that the topmost menu isn't where it is supposed to be.. I know this could be a very simple problem to fix. But since I am new to web development I really can't find a way to fix it... Please help me figure it out.. Thanks!

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >