iCreative Website

Jeg skaber smukke og funktionelle websites - Skal vi snakke?

Create an ul li based submenu in WordPress

Wordpress

No Comments


Share this post

Ever wanted to create a submenu in WordPress? – Here is how to create an <ul><li> based left menu for your wordpress site.

<?php
if(!$post->post_parent){
	// will display the subpages of the top level - Y
	$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
}else{
	// diplays only the subpages of the parent level
	//$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
 
	if($post->ancestors)
	{
		// now you can get the the top ID of this page
		// wp is putting the ids DESC, thats why the top level ID is the last one
		$ancestors = end($post->ancestors);
		$children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0");
		// you will always get the whole subpages list
	}
}
 
if ($children) { ?>
	<ul>
		<?php echo $children; ?>
	</ul>
<?php } ?>

Read more

Get Parent Page/Post title in WordPress

Wordpress

No Comments


Share this post

Do you need to get the parent page or post title in your WordPress theme?

Here is how….

<?php
$parent_title = get_the_title($post->post_parent);
echo $parent_title;
?>

Read more

How do you protect your WordPress blog? .htaccess?

Wordpress

No Comments


Share this post

You can use .htaccess, you can also choose to download a plugin for this matter – However, a .htaccess is more secure, than the plugins out there – So i would recommend that you use the .htaccess method :)

Before you paste these lines into your .htaccess file, make sure that you create a backup of your file, just in case ;)

Here the code:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

Read more

A wordpress ping list

Wordpress

1 Comment


Share this post

Below is a ping list that you can use for your WordPress blog.

Every time you create a new post, these services will be notified of your blog post – This will increase your online exposure.

To use this list, copy and paste this list to your Settings->Writing tab in the admin panel.

http://blogsearch.google.com/ping/RPC2
 
http://www.a2b.cc/setloc/bp.a2b
 
http://1470.net/api/ping
 
http://a2b.cc/setloc/bp.a2b
 
http://api.feedster.com/ping
 
http://api.moreover.com/ping
 
http://api.moreover.com/RPC2
 
http://api.my.yahoo.co.jp/RPC2
 
http://api.my.yahoo.com/ping
 
http://api.my.yahoo.com/RPC2
 
http://api.my.yahoo.com/rss/ping
 
http://audiorpc.weblogs.com/RPC2
 
http://bblog.com/ping.php
 
http://bitacoles.net/notificacio.php
 
http://bitacoles.net/ping.php
 
http://bitacoras.net/ping
 
http://blo.gs/ping.php
 
http://blog.goo.ne.jp
 
http://blog.goo.ne.jp/XMLRPC
 
http://blogbot.dk/io/xml-rpc.php
 
http://blogdb.jp
 
http://blogdb.jp/xmlrpc
 
http://blogdigger.com/RPC2
 
http://blogmatcher.com/u.php
 
http://blogoole.com/ping/
 
http://blogoon.net/ping/
 
http://blogpeople.net/ping
 
http://blogroots.com/tb_populi.blog?id=1
 
http://blogsearch.google.ae/ping/RPC2
 
http://blogsearch.google.at/ping/RPC2
 
http://blogsearch.google.be/ping/RPC2
 
http://blogsearch.google.bg/ping/RPC2
 
http://blogsearch.google.ca/ping/RPC2
 
http://blogsearch.google.ch/ping/RPC2
 
http://blogsearch.google.cl/ping/RPC2
 
http://blogsearch.google.co.cr/ping/RPC2
 
http://blogsearch.google.co.hu/ping/RPC2
 
http://blogsearch.google.co.id/ping/RPC2
 
http://blogsearch.google.co.il/ping/RPC2
 
http://blogsearch.google.co.in/ping/RPC2
 
http://blogsearch.google.co.it/ping/RPC2
 
http://blogsearch.google.co.jp/ping/RPC2
 
http://blogsearch.google.co.ma/ping/RPC2
 
http://blogsearch.google.co.nz/ping/RPC2
 
http://blogsearch.google.co.th/ping/RPC2
 
http://blogsearch.google.co.uk/ping/RPC2
 
http://blogsearch.google.co.ve/ping/RPC2
 
http://blogsearch.google.co.za/ping/RPC2
 
http://blogsearch.google.com.ar/ping/RPC2
 
http://blogsearch.google.com.au/ping/RPC2
 
http://blogsearch.google.com.br/ping/RPC2
 
http://blogsearch.google.com.co/ping/RPC2
 
http://blogsearch.google.com.do/ping/RPC2
 
http://blogsearch.google.com.mx/ping/RPC2
 
http://blogsearch.google.com.my/ping/RPC2
 
http://blogsearch.google.com.pe/ping/RPC2
 
http://blogsearch.google.com.sa/ping/RPC2
 
http://blogsearch.google.com.sg/ping/RPC2
 
http://blogsearch.google.com.tr/ping/RPC2
 
http://blogsearch.google.com.tw/ping/RPC2
 
http://blogsearch.google.com.ua/ping/RPC2
 
http://blogsearch.google.com.uy/ping/RPC2
 
http://blogsearch.google.com.vn/ping/RPC2
 
http://blogsearch.google.com/ping/RPC2
 
http://blogsearch.google.com/ping/RPC2
 
http://blogsearch.google.com/ping/RPC2
 
http://blogsearch.google.de/ping/RPC2
 
http://blogsearch.google.es/ping/RPC2
 
http://blogsearch.google.fi/ping/RPC2
 
http://blogsearch.google.fr/ping/RPC2
 
http://blogsearch.google.gr/ping/RPC2
 
http://blogsearch.google.hr/ping/RPC2
 
http://blogsearch.google.ie/ping/RPC2
 
http://blogsearch.google.in/ping/RPC2
 
http://blogsearch.google.it/ping/RPC2
 
http://blogsearch.google.jp/ping/RPC2
 
http://blogsearch.google.lt/ping/RPC2
 
http://blogsearch.google.nl/ping/RPC2
 
http://blogsearch.google.pl/ping/RPC2
 
http://blogsearch.google.pt/ping/RPC2
 
http://blogsearch.google.ro/ping/RPC2
 
http://blogsearch.google.ru/ping/RPC2
 
http://blogsearch.google.se/ping/RPC2
 
http://blogsearch.google.sk/ping/RPC2
 
http://blogsearch.google.tw/ping/RPC2
 
http://blogsearch.google.us/ping/RPC2
 
http://blogshares.com/rpc.php
 
http://blogsnow.com/ping
 
http://blogstreet.com/xrbin/xmlrpc.cgi
 
http://blogupdate.org/ping/
 
http://bulkfeeds.net
 
http://bulkfeeds.net/rpc
 
http://catapings.com/ping.php
 
http://coreblog.org/ping
 
http://effbot.org/rpc/ping.cgi
 
http://feedsky.com/api/RPC2
 
http://fgiasson.com/pings/ping.php
 
http://hamo-search.com/ping.php
 
http://holycowdude.com/rpc/ping/
 
http://imblogs.net/ping/
 
http://lasermemory.com/lsrpc/
 
http://mod-pubsub.org
 
http://mod-pubsub.org/kn_apps/blogchatt
 
http://mod-pubsub.org/knapps/blogchatt
 
http://mod-pubsub.org/ping.php
 
http://newsblog.jungleboots.org/ping.php
 
http://newsisfree.com/RPCCloud
 
http://packetmonster.net/xmlrpc.php
 
http://ping.amagle.com
 
http://ping.amagle.com/
 
http://ping.bitacoras.com
 
http://ping.bitacoras.com
 
http://ping.blo.gs
 
http://ping.blogg.de/
 
http://ping.bloggers.jp/rpc
 
http://ping.blogoon.net/
 
http://ping.blogs.yandex.ru/RPC2
 
http://ping.cocolog-nifty.com/xmlrpc
 
http://ping.exblog.jp/xmlrpc
 
http://ping.fakapster.com/rpc
 
http://ping.fc2.com/
 
http://ping.feedburner.com
 
http://ping.feeds.yahoo.com/RPC2/
 
http://ping.kutsulog.net/
 
http://ping.myblog.jp
 
http://ping.namaan.net/rpc
 
http://ping.rootblog.com/rpc.php
 
http://ping.snap.com/ping/RPC2
 
http://ping.syndic8.com/xmlrpc.php
 
http://ping.weblogalot.com/rpc.php
 
http://ping.weblogs.se
 
http://ping.wordblog.de/
 
http://pinger.blogflux.com/rpc
 
http://pingoat.com/
 
http://pingoat.com/goat/RPC2
 
http://pingqueue.com/rpc/
 
http://popdex.com/addsite.php
 
http://r.hatena.ne.jp/rpc
 
http://rcs.datashed.net
 
http://rcs.datashed.net/RPC2
 
http://rpc.blogbuzzmachine.com/RPC2
 
http://rpc.bloggerei.de/ping/
 
http://rpc.blogrolling.com/pinger
 
http://rpc.britblog.com/
 
http://rpc.icerocket.com:10080
 
http://rpc.newsgator.com/
 
http://rpc.pingomatic.com
 
http://rpc.reader.livedoor.com/ping
 
http://rpc.tailrank.com/feedburner/RPC2
 
http://rpc.technorati.com/rpc/ping
 
http://rpc.twingly.com
 
http://rpc.weblogs.com/RPC2
 
http://rpc.wpkeys.com
 
http://services.newsgator.com/ngws/xmlrpcping.aspx
 
http://signup.alerts.msn.com/alerts-PREP/submitPingExtended.doz
 
http://snipsnap.org/RPC2
 
http://syndic8.com/xmlrpc.php
 
http://thingamablog.sourceforge.net/ping.php
 
http://topicexchange.com
 
http://topicexchange.com/RPC2
 
http://trackback.bakeinu.jp/bakeping.php
 
http://wasalive.com/ping/
 
http://weblogues.com/ping/
 
http://weblogues.com/RPC/
 
http://www.a2b.cc
 
http://www.a2b.cc/setloc/bp.a2b
 
http://www.bitacoles.net/ping.php
 
http://www.blogdigger.com/RPC2
 
http://www.bloglines.com/ping
 
http://www.blogoole.com/ping/
 
http://www.blogoon.net/ping
 
http://www.blogpeople.net
 
http://www.blogpeople.net/servlet/weblogUpdates
 
http://www.blogroots.com
 
http://www.blogroots.com/tb_populi.blog?id=1
 
http://www.blogroots.com/tbpopuli.blog?id=1
 
http://www.blogsdominicanos.com/ping/
 
http://www.blogshares.com/rpc.php
 
http://www.blogsnow.com/ping
 
http://www.blogstreet.com/xrbin/xmlrpc.cgi
 
http://www.catapings.com/ping.php
 
http://www.feedsky.com/api/RPC2
 
http://www.holycowdude.com/rpc/ping/
 
http://www.imblogs.net/ping/
 
http://www.lasermemory.com
 
http://www.lasermemory.com/lsrpc
 
http://www.mod-pubsub.org/kn_apps/blogchatter/ping.php
 
http://www.mod-pubsub.org/knapps/blogchatter/ping.php
 
http://www.mod-pubsub.org/ping.php
 
http://www.newsisfree.com/RPCCloud
 
http://www.newsisfree.com/xmlrpctest.php
 
http://www.octora.com/add_rss.php
 
http://www.popdex.com
 
http://www.popdex.com/addsite.php
 
http://www.snipsnap.org
 
http://www.snipsnap.org/RPC2
 
http://www.wasalive.com/ping/
 
http://www.weblogues.com
 
http://www.weblogues.com/RPC
 
http://www.xianguo.com/xmlrpc/ping.php
 
http://www.zhuaxia.com/rpc/server.php
 
http://xmlrpc.blogg.de
 
http://xping.pubsub.com/ping
 
http://zhuaxia.com/rpc/server.php
 
http://zing.zingfast.com

Read more

Notify your members on new content

Wordpress

No Comments


Share this post

Im running a jobportal called  www.fritidsjobbere.dk – And i needed an easy way to automatically notify my members when a new post was added….

After some search on the web and the WordPress univers, i came across this…

Here is how to create a script to automatically notify your members on new content.

Insert the following script in your functions.php

function email_members($post_ID)  {
    global $wpdb;
    $usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;");
    $users = implode(",", $usersarray);
    mail($users, "New WordPress recipe online!", 'A new recipe have been published on http://www.wprecipes.com');
    return $post_ID;
}
 
add_action('publish_post', 'email_members');

That’s all – Now your members should be notified when you create a new blogpost.

Read more