Digital Raindrops
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Malicious theme downloaded from WordPress.orgThemes are inspected and tested before they are accepted into the themes repository, so it is most likely a vulnerability issue with a third party script.
David
Forum: Themes and Templates
In reply to: Custom Author ListingHi looking at the pastebin, it might be this bit!
get_author_posts_url( $author_info->ID )Try:
get_author_posts_url( $author->ID )HTH
David
Forum: Fixing WordPress
In reply to: Adding Pagination to Custom Post TypeHi vtxzzy,
I would remove the line, it is not needed, as'paged' => $paged,tells WordPress to return the $paged variable, so as you navigate through the pages WordPress sets the value, I never use the line and it works ‘out the box’ for my queries.If we look at the Codex
Pagination Note: You should set get_query_var( ‘page’ ); if you want your query to work with pagination. Since WordPress 3.0.2, you do get_query_var( ‘page’ ) instead of get_query_var( ‘paged’ ). The pagination parameter ‘paged’ for WP_Query() remains the same.
I just use:
'paged'=> $paged,Which is like:
'paged'=> get_query_var( 'page' ),Regards
David
Forum: Fixing WordPress
In reply to: Multiple arrays in one admin option from theme options page.This is a recent post, it has code for a nice theme setup page, it uses the option array, like in your example!
There is a working twenty eleven child theme as a download, the template files have calls to the option array, so if you can follow the code it will give you just what you want!
Look at the functions:
‘dr_slider_theme_options_init()’
‘dr_slider_theme_options_add_page()’
‘dr_slider_options_render_page()’
‘dr_slider_theme_options_validate($input)’
dr_slider_theme_admin_options()Then there is some more in functions.php and the other files!
In short it saves the values into an array and saves the array in a single option value.
HTH
David
Forum: Fixing WordPress
In reply to: Adding Pagination to Custom Post TypeNot sure if you are having trouble with paging or you want to know about the plugins?
If you are having trouble with paging then try and remove:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;Plugins:
If you want page-navi or wp-navigate plugins then this post might help you locate the code.HTH
David
Forum: Themes and Templates
In reply to: Theme in FTP but not in DashboardIs your WordPress single or multisite?
If it is multi-site you need to go to Network Admin and make it visible?
HTH
David
Forum: Fixing WordPress
In reply to: How to assign posts to another author?No problem,
Can you mark this topic as resolved please!David
Forum: Fixing WordPress
In reply to: Arrange Posts by Custom Fields<?php $price = get_post_meta($post->ID, 'price', true); ?> <?php if( $price ) : ?> echo is_numeric($price) ? '$' .$price : $price; <?php endif; ?>Can you post the sortorder snippit in backticks ` for your solution to help others.
HTH
David
Forum: Fixing WordPress
In reply to: Arrange Posts by Custom Fields<?php $price = get_post_meta($post->ID, 'price', true); ?> <?php if( $price ) echo '$' .$price; ?>HTH
David
Forum: Fixing WordPress
In reply to: Arrange Posts by Custom FieldsYou can add a meta field for the sort and not display it so you have a ‘price_key’ and a ‘price’ field
1. try a double orderby sort with and without the dollar, and check the sort results.
$args = array( 'meta_key' => 'price', 'orderby' => meta_value meta_value_num, 'order' => 'ASC' );2. Do not store the $ in the custom meta field just add it to the output display, something like?
<!-- With a Price $ Label --> Price $<?php echo get_post_meta( the_ID(), 'price', true ); ?> <!-- With a Multi-Language Price $ Label --> <?php echo __('Price $') .get_post_meta( the_ID(), 'price', true ); ?> <!-- $ Without a Label --> $<?php echo get_post_meta( the_ID(), 'price', true ); ?>HTH
David
Forum: Fixing WordPress
In reply to: Search Results display in BrowserHave a look at the Yoast all in one WordPress SEO plugin, you will see a search preview and you can customise how it will look!
HTH
David
Forum: Fixing WordPress
In reply to: How to assign posts to another author?Admin > Posts > Posts > Quick Edit > Author
Admin > Posts > Posts > Edit, or Add New look top right:
( Screen Options ) a box will slide down and check the value, Author [x]HTH
David
Forum: Fixing WordPress
In reply to: Arrange Posts by Custom FieldsHi,
It looks like it is sorting Alpha-Numeric so it would groups all $ nines together, $ sixes, $ fives, and $ threes, like:
$9.99
$9.47
$9.1
$9
$699
$65
$6
$5
$3.99
$3.1‘meta_value_num’ will ignore entries that do not have a numeric value in the meta key, not sure how this will sort with the leading $, test it with your price field.
Alternative:
You could add another meta field to use for the sort, value * 100 and adding a 1 + leading zeros for a fixed string length?
$9.99 = 10000999
$947 = 10094700
$699 = 10069900
$5 = 10000500
$39.99 = 10003999Untested but it should then sort ok
10094700
10069900
10003999
10000999
10000500HTH
David
Forum: Themes and Templates
In reply to: thumbnail images and text in excerpts – twenty elevenHi Elaine,
.wp-post-image { display: block; float: left; margin-right: 1em; margin-bottom: 1em; }The code and styles in my child theme might also help, there are a couple of different options using the post class, the archive.php one is the closes, it switches the images left and right.
HTH
David
Forum: Themes and Templates
In reply to: How to remove default image formatting on home pageHoping some one can help with the code to remove it altogether?
.home_post_title_cont { display: none !important; }HTH
David