How to make a conditional statement that checks if the page is the child of a certain page?
global $post; if($post->post_parent==’certain page’){ /// Her goes your code…… } Remember ‘certain page’ is your parent page id.
global $post; if($post->post_parent==’certain page’){ /// Her goes your code…… } Remember ‘certain page’ is your parent page id.
WordPress Nav Menus support Custom CSS Classes. They can be used to change the colour of your tab. Refer this link -> http://devilsworkshop.org/add-custom-class-individual-menu-items-wpnavmenu/
This is tested, this will take all your sub nav and add the class. $(‘#nav li > ul’).parent().children(“a”).addClass(“sub-nav”);
You may be able to use post meta to accomplish your goal depending on what you are doing and how you want to do it. This page from the Codex provides lots of good info about it.
This query will get all the countries and counts in one query: global $wpdb; $countries_count = $wpdb->get_results( ” SELECT meta_value AS country, COUNT(post_id) AS count FROM {$wpdb->postmeta} WHERE meta_key = ‘tgt_job_country’ GROUP BY country ORDER BY country” ); foreach ($countries_count as $country) echo “<li><a href=”http://dsdjjhfgd.net/s=jobseeker&usertype=jobseeker&country=”.$country->country.”&search=Search”>”.$country->country.”(“.$country->count.”)</a></li>”; Unless you need to get the country list first – … Read more
Redrag and drop them in the widgets area.
Thanks to the answer from John at avexdesign above as well as the link to the tutorial from SilenceIT, I have a couple more details in case anyone comes across this. As of version 3.1, the line to edit is now line 60 in the controller.php file. As stated by avexdesigns, you must change ONLY … Read more
yes, you can use a custom name for your template and style it as you need, take a look at the codex: http://codex.wordpress.org/Category_Templates
$post_content=”"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…"”; Try encoding special characters. See: http://www.w3schools.com/tags/ref_entities.asp & http://php.net/manual/en/function.htmlentities.php
The first and only thing I can add to this Q is: Avoid this plugin. At least the free version (don’t know how the paid version bahaves). I got dozens of errors and notices with WP_DEBUG set to TRUE. wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, … Read more