Forum Replies Created
-
AuthorPosts
-
winnydejong
MemberHi T-West,
I worked around it using this column solution, putting my content in between the tags:
<div class="one-half first">content left column </div>
<div class="one-half">content right column</div>This also works with <div class="one-third first"> and probably fourth and fifth as well. 🙂
Good luck!
Best, Winny
winnydejong
MemberThanks for the suggestion Victor. Unfortunately it does not seem to be the solution.
See: http://beta.datajournalistiek.nlAll other ideas are welcomed... 🙂
Best, Winny
winnydejong
MemberThanks Victor!
winnydejong
MemberHi Brad,
My Genesis > Theme settings are set to show 10 posts a page. The reading settings are also set to show 10 posts a page.
The code I've added to the funtions.php only influences the front page, which now shows only the 5 latest post.
The problem still remains: when you're on the homepage of datajournalistiek.nl, according to the pagination there are 29 pages. In reality there only 15 pages: on the frontpage the paginations divides the total number of posts by the number of posts you can actually see on the frontpage (5). In reality these 5 posts on the homepage are an exception, since all other pages show 10 posts.
How do I set up the pagination accordingly?
Thanks in advance.
Best, Winny
winnydejong
MemberHi Sridhar (and Heidi),
I wanted to do the same at my blog http://datajournalistiek.nl, but cant seem to get the image right. If I make the changes you describe in your blogpost my blog just dissapears of the radar all together...
Any idea of what could be going on? Or could it have to do something with the Genesis 2.1.1 update?
Thanks in advance, best, Winny
winnydejong
MemberThe right URL should be: http://v2.datajournalistiek.nl
August 30, 2013 at 7:53 am in reply to: Eleven40 Pro: How to change color of links in footer widgets? #59685winnydejong
MemberHi Anitac,
The URL to my website is http://datajournalistiek.nl - hopefully you still like to figure it out.
Thanks in advance!
August 29, 2013 at 12:15 am in reply to: Eleven40 theme: How to set a different loop for the homeopage? #59439winnydejong
MemberMade another topic for the pagination thing - http://www.studiopress.community/topic/pagination-how-to-fix-and-add-to-eleven40-pro/, including the link to my site. Any idea how to fix the pagination on the frontpage?
And any idea how to include the same style pagination on another page?
Thanks, Winny
winnydejong
MemberWith a little help I categorised all rss items by date; made a bullet list of the feed; added basic pagination; and fixed the title (shows up correctly).
My solution:
<?php /* Template Name: links */ // Filter toevoegen aan the_content() add_filter('the_content', 'winny_rss_content'); function winny_rss_content ($content) { //Add my latest links to page include_once(ABSPATH.WPINC.'/rss.php'); // path to include script $feed = fetch_rss('http://feeds.pinboard.in/rss/u:winnydejong/t:ddj/?count=400'); // specify feed url $items = array_slice($feed->items, 0, 999); // specify first and last item if (!empty($items)) { // Per pagina $perpage = 20; $page = (int) $_REQUEST['pagina']; $pages = ceil(count($items) / $perpage); if ($page < 0 || $page >= $pages) { // Automatisch eerste pagina als pagina nummer niet bestaat $page = 0; } // Selectie maken $items = array_slice($items, $perpage * $page, $perpage); // $date definieren, maar geen inhoud $date = ''; foreach ($items as $item) { // Datum filteren $item['date'] = date('j-n-Y', strtotime($item['dc']['date'])); if ($date != $item['date']) { if ($date) { // Vorige lijst afsluiten $content .= '</ul>'; } // Nieuwe datum $date = $item['date']; // Nieuwe lijst begonnen $content .= '<h5>' . $item['date'] . '</h5>'; $content .= '<ul>'; } // Link aan lijst toevoegen $content .= '<li><h5><a>' . htmlentities($item['title'], ENT_QUOTES, 'UTF-8') . '</a></h5>'; $content .= '<p>' . htmlentities($item['description'], ENT_QUOTES, 'UTF-8') . '</p></li>'; } // Laatste lijst sluiten $content .= '</ul>'; if ($pages > 1) { // Meer dan 1 pagina $content .= '<p>Pagina: '; for ($i = 0; $i < $pages; $i ++) { if ($i == $page) { $content .= '<strong>' . ($i + 1) . '</strong>, '; } else { $content .= '<a>' . ($i + 1) . '</a>, '; } } // Einde pagina's $content = substr($content, 0, -2) . '</p>'; } } return $content; } genesis();
winnydejong
MemberWorked some of it out by my own. Though the title of the page and the entry paragraph are still showing up under the footer... Any ideas? Help is very much welcomed! 🙂
<?php /* Template Name: Pinboard */ get_header(); ?> <div id="content" class="content"> <?php // FORCE FULL WIDTH LAYOUT //add_filter ( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); //remove_action( 'genesis_loop', 'genesis_do_loop' ); //Add my latest links to page include_once(ABSPATH.WPINC.'/rss.php'); // path to include script $feed = fetch_rss('http://feeds.pinboard.in/rss/u:winnydejong/t:ddj/'); // specify feed url $items = array_slice($feed->items, 0, 20); // specify first and last item ?> <?php if (!empty($items)) : ?> <?php foreach ($items as $item) : ?> <h3><a href=""<?php">"><?php echo $item['title']; ?></a></h3> <p><?php echo $item['description']; ?></p> <?php endforeach; ?> <?php endif; ?> </div><!-- #content --> <?php get_sidebar(); ?> <?php get_footer(); ?> <?php genesis(); ?>
August 17, 2013 at 12:57 am in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56999winnydejong
MemberHi!
Do you know how to change my pagination accordingly. At the homepage (with only 5 posts) you'll see page 1, 2, ... and 27 - while there is no page 27 since all other pages show 10 posts. When you're on the second page - which displays 10 posts - you'll see page 1, 2, ... and 14. Which is correct. This problem definitly has to do with changing the number of posts on the frontpage...
Any idea how to show the correct last pagenumber at the frontpage? Thanks in advance!!
August 16, 2013 at 3:05 pm in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56900winnydejong
MemberThanks Brad for cleaning up the code 🙂 Works just great!
August 16, 2013 at 2:27 am in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56740winnydejong
MemberActually when I start using the code Holli sent me, it also limited the number of posts on pages 2, 3, etc. instead of only on the frontpage. After some research I came up with this, and now only the frontpage shows 5, all other pages show 10 posts:
//* Limit the frontpage to only showing latest 5 posts - all other pages show 10 function frontpage_custom_post_count(&$query) { // show specific number of posts on frontpage $frontpagePostsCount = 5; if (is_front_page() and !is_paged()) { $query->query_vars['posts_per_page'] = $frontpagePostsCount; } // show configured posts on the rest of pages, offsetting the ones showed on frontpage if (is_front_page() and is_paged()) { $posts_per_page = isset($query->query_vars['posts_per_page']) ? $query->query_vars['posts_per_page'] : get_option('posts_per_page'); $query->query_vars['offset'] = (($query->query_vars['paged'] - 2) * $posts_per_page) + $frontpagePostsCount; } } add_action('pre_get_posts', 'frontpage_custom_post_count');
August 15, 2013 at 7:41 am in reply to: Eleven40 Pro: How to change color of links in footer widgets? #56550winnydejong
MemberHi Anitac,
I changed it exactly as you stated, but it still doesn't work... Any suggestions left?
Thanks!
August 15, 2013 at 3:29 am in reply to: Change font and color for Primary Navigation Menu on Eleven40 Theme #56495winnydejong
MemberHi idavinder,
I did exactly as you said above, but unfortunately no changes to be seen in my menu.
Right now I'm using the latest version of the Eleven40 theme, as seen here: http://demo.studiopress.com/eleven40/
Any ideas what I did wrong?
Thanks in advance. Best Winny
August 15, 2013 at 1:39 am in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56477winnydejong
MemberIt works great - thanks Holli! Is there any way to limit this to the frontpage?
August 14, 2013 at 4:57 pm in reply to: Eleven40 theme: How to set a different loop for the homeopage? #56426winnydejong
MemberThanks for your suggestion Holli - unfortunately though, it doesn't seem to work... Any ideas?
winnydejong
MemberSorry, I might have been unclear. I'd like the homepage to show only five posts (1 featured, 4 grid) but I want all the other pages - archive, categories etc. - to show 10.
If I make the changes you describe those pages will only show 5 posts... Any ideas how to fix this?
winnydejong
MemberHi Brad Dalton,
I also have the Eleven40 theme. I'd like to change the homepage into 1 featured posts and 4 older 'teaser' post with the featured image. Any ideas how to do this?
If I change the number of the featured posts in home.php, I'll get more featured posts (full width) but I can't seem to change the number of featured posts...
Thanks in advance! Best, Winny
-
AuthorPosts