tycooko
Forum Replies Created
-
Fine, so apparently I was able to do half the job myself by writing “any” instead of ” ‘post’ ” or ” ‘event’ “. Now the slider is complete, with all the types of posts my website has, including the events.
I still don’t know how to make it work in the RSS feed.
Here’s the code of the feed:<?php
/**
* RSS2 Feed Template for displaying RSS2 Posts feed.
*
* @package WordPress
*/header(‘Content-Type: ‘ . feed_content_type(‘rss-http’) . ‘; charset=’ . get_option(‘blog_charset’), true);
$more = 1;echo ‘<?xml version=”1.0″ encoding=”‘.get_option(‘blog_charset’).'”?’.’>’; ?>
<rss version=”2.0″
xmlns:content=”https://purl.org/rss/1.0/modules/content/”
xmlns:wfw=”https://wellformedweb.org/CommentAPI/”
xmlns:dc=”https://purl.org/dc/elements/1.1/”
xmlns:atom=”https://www.w3.org/2005/Atom”
xmlns:sy=”https://purl.org/rss/1.0/modules/syndication/”
xmlns:slash=”https://purl.org/rss/1.0/modules/slash/”
<?php
/**
* Fires at the end of the RSS root to add namespaces.
*
* @since 2.0.0
*/
do_action( ‘rss2_ns’ );
?>
><channel>
<title><?php bloginfo_rss(‘name’); wp_title_rss(); ?></title>
<atom:link href=”<?php self_link(); ?>” rel=”self” type=”application/rss+xml” />
<link><?php bloginfo_rss(‘url’) ?></link>
<description><?php bloginfo_rss(“description”) ?></description>
<lastBuildDate><?php echo mysql2date(‘D, d M Y H:i:s +0000’, get_lastpostmodified(‘GMT’), false); ?></lastBuildDate>
<language><?php bloginfo_rss( ‘language’ ); ?></language>
<?php
$duration = ‘hourly’;
/**
* Filter how often to update the RSS feed.
*
* @since 2.1.0
*
* @param string $duration The update period.
* Default ‘hourly’. Accepts ‘hourly’, ‘daily’, ‘weekly’, ‘monthly’, ‘yearly’.
*/
?>
<sy:updatePeriod><?php echo apply_filters( ‘rss_update_period’, $duration ); ?></sy:updatePeriod>
<?php
$frequency = ‘1’;
/**
* Filter the RSS update frequency.
*
* @since 2.1.0
*
* @param string $frequency An integer passed as a string representing the frequency
* of RSS updates within the update period. Default ‘1’.
*/
?>
<sy:updateFrequency><?php echo apply_filters( ‘rss_update_frequency’, $frequency ); ?></sy:updateFrequency>
<?php
/**
* Fires at the end of the RSS2 Feed Header.
*
* @since 2.0.0
*/
do_action( ‘rss2_head’);while( have_posts()) : the_post();
?>
<item>
<title><?php
$category = get_the_category();
echo $category[0]->cat_name; ?>: <?php the_title_rss() ?></title>
<link><?php the_permalink_rss() ?></link>
<comments><?php comments_link_feed(); ?></comments>
<pubDate><?php echo mysql2date(‘D, d M Y H:i:s +0000’, get_post_time(‘Y-m-d H:i:s’, true), false); ?></pubDate>
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
<?php the_category_rss(‘rss2’) ?><guid isPermaLink=”false”><?php the_guid(); ?></guid>
<?php if (get_option(‘rss_use_excerpt’)) : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<?php $content = get_the_content_feed(‘rss2’); ?>
<?php if ( strlen( $content ) > 0 ) : ?>
<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
<?php else : ?>
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
<?php endif; ?>
<?php endif; ?>
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, ‘rss2’) ); ?></wfw:commentRss>
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
<?php rss_enclosure(); ?>
<?php
/**
* Fires at the end of each RSS2 feed item.
*
* @since 2.0.0
*/
do_action( ‘rss2_item’ );
?>
</item>
<?php endwhile; ?>
</channel>
</rss>Forum: Plugins
In reply to: [Plugin: Events Manager] Events don't show in home slider nor in RSSPlease, could someone at least try to help me?
Where should I insert that code?
There’s no plugin for the slider. I’ve already explained that. It’s a slider apparently created in the moment, through codes.
Fine. The website is this one: https://www.psmtickling.com .
The slider in at the center of the home page.
Now you have all the possible data. I have no more information to give you.
Could you at least tell me what’s wrong or what am I doing wrong?P.S.: You will see events GALLERIES in the slider: those, as you will immediately realize, are not part of your plugin; they’re photo galleries created through simple WordPress posts.
Forum: Plugins
In reply to: [Plugin: Events Manager] Events don't show in home slider nor in RSSHello?
It’s a gay fetish-oriented site, that’s why the discretion. I say it more for the other users.
I pasted the complete code of the slider here, described the current situation in detail…why do you need to actually see it? You will see a slider with lots of different kinds of posts (Models: Adriano, Blog: “A new story”, etc.) and the total absence of events.
I am telling you how it looks like; how can it help you more, to see it?
And then again: why aren’t you considering the fact that the plugin might have a flaw in its code? Have you tried to reproduce my situation?Please, write a Skype contact or an email address here. Thanks.
I’ll try to explain myself more. My webiste is a complex portal with lots of different information. It has a models galleries page, a videos page, a blog, etc. etc. …and so on up to the events page.
Now: the slider is in the home page and should show all the new activity from all these kind of pages. Now it shows almost everything BUT the events, and this is NOT because the latest event was very far back in time, because it is only a few months old, and it doesn’t appear in the slider, while even older posts of the “Models” page, for instance, do appear.caimin, you’re getting stuck to a term while I’m trying to get to a more concrete point. I paste here what I said in my first message: “Now with a VERY simple language (the site was built by a friend: I don’t know anything about codes and plugins)”.
Since I can see the term “category” upset you, because for what I can understand it means something very precise in WordPress, from now on I’ll use the term “kind” or “genre” or whatever you like, even “mickeymouse”.
So: the mickeymouse of the posts published by the Events Manager plugin doesn’t work together with the normal WordPress posts.
Your solution clearly doesn’t consider my past messages: I DON’T SEE ANY POSTS FROM THE KIND/GENRE/MICKEYMOUSE “EVENTS”. The events are completely cut off from the slider; it’s not that I only see the recent events!
Please, for the second time I beg you to read all my messages.Here, take a look: ‘post_type’ => array( ‘post’, ‘event’ )
The type of post of the events SHOULD BE “event”. This is confirmed by the fact that if I put that word alone, suddenly the events appear in my slider. But if I leave the code as it is, theoretically with the events and the normal WordPress posts together, the events disappear.
Forum: Plugins
In reply to: [Disqus Recent Comments Widget] Recent comments from only one category?That’s exactly the reason why I wrote, my friend: we all have a job. And mine is connected to your plugin. ??
caimin_nwl: Pardon me, but I believe I might expressed myself poorly. The point is not that I have problems getting the events I want; the point is I don’t get any event at all. It seems to be an issue with the category represented by the events, not their order.
Please, read my messages above.I have further information.
In the line where it reads “‘post_type’ => array( ‘post’, ‘event’ ),”, if I delete “‘post’,” and just leave “‘event'”, the events created with Events Manager appear in the slider!
Of course they alone, without any other category’s post.Apparently, the slider is not a plugin, but natively created in my website’s code. Here’s the page of the editor for the slider:
<?php query_posts( ‘posts_per_page=10’ ); ?>
<div id=”sticky-container”>
<div id=”sticky-content” class=”row clearfix”><div class=”large-3 columns clearfix medium-3 show-for-medium-up carousel-wrapper show-for-medium-up” role=”sticky-sidebar”>
<div class=”carousel”>
<div class=”c-wrapper”><?php $query = new WP_Query( array(
‘post_type’ => array( ‘post’, ‘event’ ),
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘posts_per_page’ => 10) );
//’posts_per_page’ => -1) );
?><?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<?php global $post; ?>
<div class=”c-list”>
” data-rel=”<?php the_ID(); ?>”>
<div class=”row clearfix”>
<div class=”large-3 medium-3 columns clearfix”><?php the_post_thumbnail(array(70, 70), array(‘class’ => ’rounded-thumb thumb’)); ?>
</div>
<div class=”large-6 medium-6 columns clearfix”>
<div class=”cell vertical-align”>
<div class=”post-date”><?php echo get_the_date(‘d/m/Y’); ?></div>
<h4 class=”post-title”><?php the_title(); ?></h4>
</div>
</div>
</div></div>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
</div>
</div>
<img src=”<?php echo get_template_directory_uri(); ?>/library/images/psm-arrow-up.png” class=”ico”>
<img src=”<?php echo get_template_directory_uri(); ?>/library/images/psm-arrow-down.png” class=”ico”>
</div>
<div class=”large-6 columns clearfix medium-6 show-for-medium-up” role=”sticky-sidebar”>
<div class=”sticky-post-list”>
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?><div class=”sticky-post” data-rel=”<?php the_ID(); ?>”>
“><?php the_post_thumbnail(‘sticky-home’); ?>
<div class=”post-date” style=”margin: 20px auto -20px;”><?php echo get_the_date(‘d/m/Y’); ?></div>
<h3 class=”panel-title”>“><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
</div><?php endwhile; endif; ?>
</div>
</div><div class=”large-9 columns clearfix show-for-small-only mobile-main-slider”>
<div class=”swiper-container”>
<div class=”swiper-wrapper”><?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<div class=”sticky-post swiper-slide” data-rel=”<?php the_ID(); ?>”>
“>
<?php the_post_thumbnail(‘sticky-home’); ?>
<h3><?php the_title(); ?></h3>
</div>
<?php endwhile; endif; ?></div>
</div></div>
</div>
</div>
<?php wp_reset_query(); ?>