<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>THE MOLITOR FORUMS &#187; Topic: Post navigation</title>
		<link>http://www.themolitor.com/forums/topic/post-navigation</link>
		<description>THE MOLITOR FORUMS &#187; Topic: Post navigation</description>
		<language>en-US</language>
		<pubDate>Wed, 29 Apr 2026 16:43:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.themolitor.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.themolitor.com/forums/rss/topic/post-navigation" rel="self" type="application/rss+xml" />

		<item>
			<title>THE MOLITOR on "Post navigation"</title>
			<link>http://www.themolitor.com/forums/topic/post-navigation#post-41675</link>
			<pubDate>Thu, 08 Jun 2017 10:29:20 +0000</pubDate>
			<dc:creator>THE MOLITOR</dc:creator>
			<guid isPermaLink="false">41675@http://www.themolitor.com/forums/</guid>
			<description><p>Hi there,</p>
<p>When using the "Videos Page" page template (<a href="http://themes.themolitor.com/vysual/videos/">demo site example</a>), all video posts are loaded and displayed full-screen individually. </p>
<p>Since this is a multi-post template, next/prev buttons allow for navigating all the video posts that were pulled. When users click the next/prev buttons, one of two options will occur: (1) If AJAX is active, a custom script will run that grabs content and loads it on the page. (2) If AJAX is not active, the links will load page content like normal links do.</p>
<p>Here is the custom script from script/custom.js that runs if AJAX is turned on (lines 280-383 ...</p>
<pre><code>/////////////////////////////
//AJAX -- GENERAL CLICK STUFF
/////////////////////////////
jQuery(document).on(&#039;click&#039;,&#34;a&#34;,function(){

   //VAR SETUP
   var thisLink = jQuery(this),
       thisParent = thisLink.parent().attr(&#039;id&#039;),
       url = thisLink.attr(&#039;href&#039;);

	//DETERMINE IF PROPER SITE LINK
	if(thisLink.attr(&#039;id&#039;) != &#039;link-rss&#039; &#38;&#38; url.indexOf(siteUrl) == 0 &#38;&#38; thisParent != &#34;load-more&#34; &#38;&#38; url.indexOf(&#34;#&#34;) == -1 &#38;&#38; url.indexOf(&#34;wp-admin&#34;) == -1 &#38;&#38; url.indexOf(&#34;.jpeg&#34;) == -1 &#38;&#38; url.indexOf(&#34;.png&#34;) == -1 &#38;&#38; url.indexOf(&#34;.gif&#34;) == -1 &#38;&#38; url.indexOf(&#34;.jpg&#34;) == -1 &#38;&#38; url.indexOf(&#34;.pdf&#34;) == -1 &#38;&#38; url.indexOf(&#34;.zip&#34;) == -1 &#38;&#38; url.indexOf(&#34;mailto&#34;) == -1 &#38;&#38; theBody.hasClass(&#039;ajax-on&#039;)){

		//CLOSE SIDEBAR
		sideClose();

		//UPDATE LOADING BG
		loadingBg();

		//LOADING NOTICE
		loadingPage.stop(true,true).fadeIn(500,function(){

			//PAUSE BG VIDEO
			pauseBgVideo();

			//CLOSE SEARCH
			closeSearch();

			//UPDATE URL
			if(url!=window.location &#38;&#38; history.pushState) window.history.pushState({path:url},&#039;&#039;,url);

			//ADD/REMOVE THE AJAX CONTAINER
			jQuery(&#34;#ajax-content&#34;).remove();

			contentContainer.append(&#039;&#60;div id=&#34;load-here&#34;&#62;&#60;/div&#62;&#039;);

			var loadHere = jQuery(&#039;#load-here&#039;);

			//POSITION THE AJAX CONTAINER
			loadHere.load(url + &#34; #ajax-content&#34;,null, function() {

				//UPDATE PAGE TITLE
				document.title = jQuery(&#039;#page-info&#039;).data(&#039;page-title&#039;);

				//PLAY BG VIDEO
				playBgVideo();

				//CHECK IF CONTENT EXISTS
				if(loadHere.html().length &#62; 0){		

					//WAIT FOR IMAGES TO LOAD
					loadHere.waitForImages(function() {

		    			//REMOVE WRAPPER
			    		loadHere.replaceWith(loadHere.html());

			    		//RESET SCROLL POSITION
						jQuery(&#039;.scroll-wrapper&#039;).scrollLeft(0);
						jQuery(&#039;.scroll-this &#62; div&#039;).scrollTop(0);

			    		//LOADING NOTICE
			    		loadingPage.stop().fadeOut(800,function(){
			    			loadingBg();
			    		});

			    		//UPDATE CURRENT MENU ITEM
			    		if(!thisLink.hasClass(&#039;pagenav&#039;)){
			    			//REMOVE CURRENT CLASS
			   				jQuery(&#039;.current-menu-item&#039;).removeClass(&#039;current-menu-item&#039;);

			   				//CHECK IF URL MATCHES MENU ITEM URL
							jQuery(&#039;#dropmenu a&#039;).each(function(){
								if(jQuery(this).attr(&#039;href&#039;) == url){
									jQuery(this).parent().addClass(&#039;current-menu-item&#039;);
								}
							});
						}

						//RUN FUNCTION
						pageCenter();
						postsCenter();
						galleryCheck();
						postOverflowCheck();
						letMyPeopleScroll();
						scrollOnce();

						setTimeout(postsCenter, 1);
					});

				} else {

					//LOADING NOTICE
		    		loadingPage.stop().fadeOut(800);

		    		//404 ERROR
		    		alert(&#039;Nothing found.&#039;);

				}//END CONTENT CHECK
	   		});//END AJAX LOAD
   		});//END LOADING FADE IN

		return false;
	}//END IF PROPER SITE LINK
});</code></pre>
<p>If you have AJAX turned off, simply adding the necessary facebook markup to header.php should be sufficient. Just be sure to use proper <a href="https://codex.wordpress.org/Conditional_Tags">WordPress Conditional Tags</a> to determine which page is being viewed so that you can customize the content that is provided in the meta tags. </p>
<p>Hope that helps!</p>
<p>Best,</p>
<p>Christopher
</p></description>
		</item>
		<item>
			<title>bavka on "Post navigation"</title>
			<link>http://www.themolitor.com/forums/topic/post-navigation#post-41674</link>
			<pubDate>Thu, 08 Jun 2017 06:02:13 +0000</pubDate>
			<dc:creator>bavka</dc:creator>
			<guid isPermaLink="false">41674@http://www.themolitor.com/forums/</guid>
			<description><p>Chris, can you explain how and where post navigation in videos page is handeled? I need to intercept current url, get the postid and put info from post in header to change meta tags for facebook and twitter. </p>
<p>How do I know which post to take with url <a href="http://mysite.com/page/2/" rel="nofollow">http://mysite.com/page/2/</a></p>
<p>This should all be done in header.php so the facebook and twitter can get correct data.
</p></description>
		</item>

	</channel>
</rss>
