Skip to content

Instantly share code, notes, and snippets.

View bizikov's full-sized avatar

Alexandr Bizikov bizikov

View GitHub Profile
@bizikov
bizikov / random.php
Created February 19, 2014 05:18
Вывод случайных записей в wordpress
<div class="rand">
<span>Случайные записи</span>
<?php $MyArgs = array('orderby' => 'rand','showposts' => '6'); ?>
<?php query_posts($MyArgs); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="excerpt">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail(); ?>
<p class="title"><?php the_title(); ?></p>
@bizikov
bizikov / rss-parser.php
Last active April 5, 2020 15:36
Парсер rss ленты на php
<?php
$orenru = 'http://www.oren.ru/rss/';
$ural56 = 'http://www.ural56.ru/news/news-rss.php';
$oreninform = 'http://oreninform.ru/rss/';
$ru56 = 'http://56.ru/text/rss.xml';
$xml = $orenru;
$rss = simplexml_load_file($xml);
echo '<div class="orenburg-rss-stream"><ul>';