Pagination in pages (not posts) with the twentythirteen theme?

I wrote a very long page with a lot of content and would like to add a pagination to make it more readable. I added in the texteditor several <!–-nextpage–-> but it doesn't create any pagination, although in the default twentythirteen page template the wp_link_pages function is called <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> I'm using a child theme …
Category: Web

Mobile Menu not working on TwentyThirteen child theme

I have customised the Twenty Thirteen wordpress theme with a child theme but the mobile menu does not expand when pressed. I have removed all the styles from the child theme to see if anything I have implemented was causing the issue but even with the styles of the parent Twenty Thirteen theme the mobile menu does not expand. I have deactivated all plugins and again this did not help. Could really use some help with this as I am …
Category: Web

Trouble with responsivitizing my twentythirteen header

I'm using the twentythirteen theme and trying to get the header to adapt to screen resolution. I've uploaded several image files with the required resolutions, and changed my custom-header.php source code according to what is suggested here. The website, www.ensemblepourviroflay.org/wp/ (can't link more than twice with newbie account), does not seem to be displaying any of the images, at whichever resolution. I have pasted the content of my custom-header.php file here. I would appreciate it if a kind stranger would …
Category: Web

Restoring Wordpress Header Image

Wordpress twenty thirteen theme. I have no idea how this arose. The opening page had a header image which started just beneath the green menu bar to just above the main central (yellow) text panel. Having noticed the image had gone, I tried to restore by going into customise and restoring the image. This only resulted in the image being displayed as a background image, not what I wanted. Another page within the site shows another header image and how …
Category: Web

TwentyThirteen theme Posts page shows posts instead of page content

Under: Settings -> Reading -> Front page displays -> A static page -> Posts page I can choose the name of a WordPress page from the drop-down menu. How come WordPress takes the page title, displays the page title in the menu on the front page, and then, when I click on the page title I am shown the blog posts, instead of that page's content? This makes me think pages are not suitable for use in this area as …
Category: Web

Menu item added in wp_nav_menu_items filter is never highlighted

In a Twenty Thirteen child theme I append a menu item (a link to /player-number page template, where the number is different for each user and represents her or his id in a game database) using the wp_nav_menu_items hook: function my_nav_menu_items( $items ) { $profile = sprintf('<li id="menu-item-32" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-32"> <a href="/player-%d/#navbar">Profile</a></li>', 42); // 42 is just a placeholder here, representing user id return $items . $profile; } add_filter( 'wp_nav_menu_items', 'my_nav_menu_items' ); And that item is visible and …
Category: Web

How to create and populate with few links a menu in child theme functions.php?

The official Twenty Thirteen theme defines just a single menu in the /wp-content/themes/twentythirteen/header.php file: <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?> In the child theme of my website I am trying to populate that menu programmatically in the /wp-content/themes/twentythirteen-child/functions.php file, because: It makes reinstalling the website easier (less manual steps). The last menu item should point to /player-ID link. So I have tried to add the code: function my_register_menus() { register_nav_menus( array( …
Category: Web

How to pass a numeric id to a page template?

I am using a Wordpress installation with Wordpress Social Login as a "canvas" for an HTML5-based board game. In the file /wp-content/themes/twentythirteen-child/front-page.php I get the numeric ID of the viewing user (returned by wp_get_current_user() method) and then her or his Facebook data (id, first name, last name, gender) from the $wpdb->prefix . 'wslusersprofiles' table - and can display the game and score for that user at the front page of my website. My question please: underneath the game board I …
Category: Web

How to add #navbar to all page links?

I have several Wordpress websites with large images at their tops, using 2013 child theme. How to add #navbar anchor to all page links, so that the browser scrolls down a bit, when a user clicks a link in the Pages widget? (because otherwise users think that nothing has happened after they click, since they see the same big image again). In the file wp-includes/widgets/class-wp-widget-pages.php I have found the source code for the WP_Widget_Pages, but I am not sure how …
Category: Web

Set a link in child theme style.css to jump to #main

I have created a 2013 child theme by creating these 2 files - /wp-content/themes/twentythirteen-child/style.css: @import url("../twentythirteen/style.css"); .site-header .home-link { min-height: 800px; } /wp-content/themes/twentythirteen-child/functions.php: <?php function my_custom_header_setup() { $args = array('height' => 800); add_theme_support('custom-header', $args); } add_action('after_setup_theme', 'my_custom_header_setup'); ?> Now the website has a large image at the top and looks as I wanted it. However, when users click at the large image, then "nothing happens" for them. I would like to change it, so that the click at the large …
Category: Web

Moving comments section to left of content (Twenty Thirteen)

So I want to move my comments section to the left of my content in my Twentythirteen child theme. I've located where it's pulled from in the content.php file: <?php if ( comments_open() && ! is_single() ) : ?> <div class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> </div><!-- .comments-link --> <?php endif; // comments_open() ?> <?php if …
Category: Web

Theme twentythirteen widget area clearfix

I've put quite a lot of stuff on my widget area and now if the post is not long enough my widget area spills in the footer area as shown on the image below: Now, I'm not a designer, but I have been googling and trying to find out where to exactly place the needed CSS (I found I should use some kind of clearfix solution). I tried adding <div style="clear:both;"></div> in several places (before the footer, before widgets last …
Category: Web

Why and how is twentythirteen adding a margin-top to my footer?

I'm using the twentythirteen theme with a child theme. I tried to solve the infamous overflowing sidebar problem this way: - made the content float left with a fixed width - made the sidebar float right with a fixed width - added a clearfix class to the parent div Everything seems about right. BUT, for some reason, I find that the theme is adding a margin-top to my footer that seems to be equal to the difference between the bottom …
Category: Web

Show all posts on a twentythirteen multisite

I'm using the default twentythirteen on a wordpress 4.0 site. I have one site in the network right now. I may be adding one or two next year or so. Both blogs are using twentythirteen. Right now the "main" blog only loops out its own posts. I want it to include the child blog. Is there a good way to do this? Doesn't matter if i have to do some manual tinkering in the code when i add a blog …
Category: Web

Disable post thumbnails in Twenty Thirteen child theme

I've made a theme that's a child of the standard Twenty Thirteen theme. Twenty Thirteen displays post_thumbnail images at the top of each of my pages, and I'd like my theme to not do this. I could create my own version of all the templates that use it (like page.php, content.php) but this seems overkill for making such a small change. I tried doing remove_theme_suport('post-thumbnail') but that had no effect. I tried just deleting the add_theme_support('post-thumbnail') line from Twenty Thirteen's …
Category: Web

Use code from bundled themes in my theme and resell it

Since a while I have started comparing frameworks for wordpress in order to understand the way wordpress works. Now that I understand the code more clearly, I have compared it to the twentythirteen and twentyfourteen themes bundled with wordpress. I came to understand that quite alot of the code seems to be the same, apart from the functions they all seem to use and call for. Can I do the same thing, using code from those themes? I'm sorry if …
Category: Web

Overriding methods in a child theme

Guided by the Codex doc on Child Themes I have created a twentythirteen-child theme for my website by copying the unchanged index.php file from the parent theme and by creating this simple style.css file: /* Theme Name: Twenty Thirteen Child Theme URI: http://example.com/twenty-fourteen-child/ Description: Twenty Thirteen Child Theme Author: Alexander Farber Author URI: http://afarber.de Template: twentythirteen Version: 1 Tags: light, responsive-layout, accessibility-ready Text Domain: twenty-thirteen-child */ @import url("../twentythirteen/style.css"); .site-header .home-link { min-height: 800px; } However since my website uses a …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.