generator

RSS Generator

Posted on

You’ll need a MySQL database with a a table called `rss_feed`. In that table there are 3 colums: item title (which is the name a person will see for an item), the item link (which is the location of the page with the item on it), and description (which tells what the feed is about). Put the file in a folder called feed and you’re feed will be available at yoursite.com/feed

Remember to change the feed title, link and image for your specific feed.


<?php
   
   // Connect to database... (you'll need to create this yourself)
   require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/connection.php';

   // Run query...
   $getFeed = mysql_query("SELECT *
                           FROM `rss_feed`
                           ORDER BY `time` DESC
                           ")or die(mysql_error());

   // Output XML (RSS)
    echo '
          
                
                        Your RSS Title
                        http://the_location_of_your_feed/feed
                        Description of your Feed
                        English
                        
                                website Logo
                                
                                Link to image
                                width
                                height
                        ';
						while($rssFeed = mysql_fetch_array($getFeed)) {
        					 echo '',
					              '', $rssFeed['item_title']',
					              '', $rssFeed['link'], '',
					              '
								   ';

 						}
				echo '
        ';

?>

Remove WP Generator Meta Tag

Posted on Updated on

It can be considered a security risk to make your wordpress version visible and public you should hide it.

Put in functions.php file in your theme:

remove_action(‘wp_head’, ‘wp_generator’);