Kakoma
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Custom Colors in Menu Bar@querygirl, your question is about CSS, not about WordPress in particular.
To style ANY individual item in CSS, you need to be able to uniquely identify it. In your case, going by the code you shared, you have to style each<li>
item differently. Using your menu as an example, stripped of all its glory<ul> <li class="cat-item cat-item-3"><a class="sf-with-ul" href="#" title="View all posts filed under Computers">Computers</a></li> <li class="cat-item cat-item-1"><a href="#" title="View all posts filed under General">General</a></li> <li class="cat-item cat-item-6"><a class="sf-with-ul" href="#" title="View all posts filed under Graphic Design">Graphic Design</a></li> </ul>
You’ll need to do something like:
/*To style 'Computers' */ ul li.cat-item-3 { background: #35B3E6; } ul li.cat-item-3 a:hover{ background: #FFF; } /*To style 'General' */ ul li.cat-item-1 { background: #35B3E6; } ul li.cat-item-1 a:hover{ background: #FFF; }
The class, ‘cat-item-x’ is what you use to zero-in on your individual menu item
Forum: Plugins
In reply to: Set Custom Post Title ProgrammaticallyThis is long overdue but just in case someone needs it, it is best to use the ‘enter_title_here’ filter and modify the title to hold something relevant to your custom post type
add_filter('enter_title_here','themeSlug_alter_title_label',10,2); function themeSlug_alter_title_label($label, $post){ if( 'book' == get_post_type($post) ) $label = __('Enter book title here', 'guntu'); return $label; }
Forum: Themes and Templates
In reply to: Changing header code in functions.phpHi sbbn,
The name of theme you are using and your site URL would help us give more informed responses BUT have you tried changing CSS instead?Forum: Themes and Templates
In reply to: twenty eleven nav menu removalHi mellabee,
I’m not too sure I’ve understood the question but if the vertical menu is being added by a widget, why not just remove the widget?
Please clarifyForum: Fixing WordPress
In reply to: Remove "Archives" and "Categories" from sidebarGlad I could help
Forum: Hacks
In reply to: $wpdb->insert,$wpdb->update and $wpdb->select are using a fixed column variableWas developing the application using Facebook’s OpenGraph API; logged in as a different user and the issue disappeared.
Hi abdoulsatar,
Do you have FTP access to the site? You could download the new version and upload it to the plugins directly(/wp-content/plugins)Hi yatong,
Yes they can. See https://smackoba.com
All three are in use thereForum: Developing with WordPress
In reply to: Conflict between my JQuery and PHP scriptsHi chdemers,
As Oleg pointed out, you’ll need to provide more detail. However, the jQuery ‘$’ does present some issues on some sites. This can be resolved by replacing all instances of $ by jQuery
e.g.
$('#someid').click
with :
jQuery('#someid').click
Hi Ashish,
You’ll need to give a few more details on your issue; though from what you’ve shared, depending on how comfortable you are with editing .php files, you won’t need a plugin.
You can edit single.php in your theme(used to display posts) and add code that will execute on only some posts
e.g.<?php if(is_single('181')): ?> //code <?php endif; ?>
The code //code would only execute on post 181. You can do the same for page.php
Forum: Fixing WordPress
In reply to: Remove "Archives" and "Categories" from sidebarHi saltedlemons,
My bad; was avoiding having to download the theme ??
Anyway, so downloaded it; to resolve your issue, open header.php (wp-content/themes/imbalance/header.php)
and change lines 63 and 64 (shown below)<li><a href="#" rel="toggle[categories]" title="">Categories</a></li> <li><a href="#" rel="toggle[archives]" title="">Archives</a></li>
to:
<!-- <li><a href="#" rel="toggle[categories]" title="">Categories</a></li> <li><a href="#" rel="toggle[archives]" title="">Archives</a></li>-->
Basically, add <!– at the beginning of line 63 and –> at the end of line 64
Forum: Fixing WordPress
In reply to: Remove "Archives" and "Categories" from sidebarHi saltedlemons,
What you are actually referring to is the main menu. A quick fix: Login to your site, click ‘Pages’ in the menu on the left hand side. A list of pages will show up…For the pages you don’t want displayed(categories and archives), click ‘Quick Edit’ and change status to ‘Draft’. Then save.This ought to fix the issue; long-term however, you might need that archives page
Forum: Plugins
In reply to: Creating table from wordpressHi 24adithya,
You aren’t using the DB Prefix in your query.
For the select query,$results = $wpdb->get_results("select url,tag from url_parse where url = $url[url_name] and tag = $url[tag_name]");
That should be:
//Get table name $table_name = $wpdb->prefix . "url_parse";
Then
//Use the table name in the select query $results = $wpdb->get_results("select url,tag from $table_name where url = $url[url_name] and tag = $url[tag_name]");
Forum: Plugins
In reply to: How to use $wpdb in pluginHi Will,
$result = $wpdb->get_results("select * from wp_posts");
isn’t really ‘something simple’.
You are basically returning a very big result set; more so if your blog has a big number of posts.
Try something like:$result = $wpdb->get_results("select * from wp_posts where ID='1'");
Better-still, for an even faster query, don’t use the ‘*’ syntax but specify exactly which field(s) you want from wp_posts.
$first_post_author = $wpdb->get_results("select post_author from wp_posts where ID='1'");
Forum: Fixing WordPress
In reply to: $wpdb->insert doen't work in any wayHi Sven,
First try viewing the query being run to give you a better idea of what’s going on. Use:
echo $wpdb->last_query;