dumcoder
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueAlright. Thank you for all of your help. You have saved me hours of frustration.
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueThat is beautiful. Thank you very much.
Now extending on that, is it possible to sort out the super_m value?
As in count the ‘super_m’s with data?So if:
super_m = ” //don’t count
super_m = ‘Hello.’ //countYour help is very much appreciated.
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueMy issue with that is, it only counts how many ‘_custom_meta’s have ‘super_m’ in them. Not how many ‘super_m’s are in the ‘_custom_meta’ meta_key.
So if I have a ‘_custom_meta’ that contains ‘super_m’ more than once, it only counts it as one.
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueOk so basically in my wp_postmeta table, I have 4 posts with the meta_key being ‘_custom_meta’.
Now within those 4 posts, I want to count all occurrences of ‘super_m’.
So we know that ‘_custom_meta’ = 4
I need to know how many times ‘super_m’ is written in the contents of the strings.
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valuereturns 0. I can count 11 in the db.
Forum: Fixing WordPress
In reply to: Navigation menu backround color incomplete<img src=”https://www.gleneirau3a.com/wp-content/themes/twentyten/images/headers/sunset.jpg” width=”940″ height=”198″ alt=””>
Your header image had a width of 940.
Forum: Fixing WordPress
In reply to: Navigation menu backround color incomplete‘
#access {
background: black;
display: block;
float: left;
margin: 0px auto;
width: 940px;
}
‘
should do itForum: Fixing WordPress
In reply to: Logo Centeringwouldn’t recommend that
Forum: Fixing WordPress
In reply to: Logo Centeringh2 {
margin-left: auto;
margin-right: auto;
}??
Forum: Fixing WordPress
In reply to: Logo Centering<center><a rel="" href="https://churroblog.com" title="Churro Blog"><span class="navigation_spacer"><img src="https://churroblog.com/wp-content/uploads/2010/10/churrobloglogo.png" border="0" alt="Churro Blog" /></span></a></center>
?Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueLost.
$dum = get_post_custom_values('_custom_meta'); $coder = implode(':',$dum); $help = unserialize($coder); echo substr_count($help, 'super_m');
Previous working code on older wordpress looked something like this
<?php $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id) LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) WHERE $wpdb->terms.term_id = '9' AND $wpdb->postmeta.meta_key = '$day' AND $wpdb->postmeta.meta_value != '' "); echo '(' .$count . ')';?>
Code executed in header….
Forum: Fixing WordPress
In reply to: Calculate occurrences of text word in postmeta meta_valueNow what if I had multiple meta_keys with the same name I am trying to read? Sorry for ignorance, it’s been a long day. Just figured I would look for some help, this has been holding me up a while and I am so burnt out on it.