How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?

I would like to add toggle style button near the left sidebar for collapsing and opening/closing the left sidebar of Wordpress default Twenty Fifteen theme. I have this code for only removing the left sidebar: body:before, #sidebar, #colophon, .entry-footer { display:none; } .site-content { margin: 0 auto; float: none; width: 100%; max-width: 1200px; } So how can I also add an arrow for manually opening and closing the left sidebar of twenty fifteen theme? And how to stretch whole site …
Category: Web

Changing text for "Continue reading..." translation

I am not satisfied with the read more text in Twenty Fifteen (I am using the French translation). In English it says "Continue reading", and in French it is very similar, but it didn't work well with the title replacement in the string, so I tried to change it to not display the title at all, and instead be a static phrase like "Read more". I tried to modify "/www/wp-content/languages/themes/twentyfifteen-fr_FR.po", line 285, however since then it stopped translating the text …
Category: Web

Twenty Fifteen: Change navigation menu behavior

This is the JS code responsible for the main navigation menu in the Twenty Fifteen theme: function initMainNavigation( container ) { // Add dropdown toggle that display child menu items. container.find( '.menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' ); // Toggle buttons and submenu items with active children menu items. container.find( '.current-menu-ancestor > button' ).addClass( 'toggle-on' ); container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' ); container.find( '.dropdown-toggle' ).click( function( e ) { var _this = $( this …
Category: Web

How to stop twenty fifteen theme from cropping featured images?

The twenty fifteen theme always crops featured images, it cuts from both lower and upper part of the image usually. How to prevent it? How to show the normal (full) dimensions of featured images? In functions.php: add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 825, 510, true ); changing above to higher dimensions dont take any effect. How to fix?
Category: Web

Hide Featured Image in Post in Twenty Fifteen

I'm using Twenty Fifteen as a parent theme. The only thing in child styles.css is the CSS I pasted below. I want to have a Featured Image (FI) in posts, but not display it in the posts, so that e.g. the Related Posts plugin uses the FI for a thumbnail. The problem is SPACING. I've hidden the FI via CSS, but I can't get the spacing to behave exactly as it does with no FI selected. This is the CSS …
Category: Web

AJAX numerical pagination problem in TwentyFifteen-child theme

I want to create an AJAX numeric pagination. And found code in a website. And it works perfectly at first click event, but on the second click it doesn't. If I click in pagination page 4, it works perfectly (And doesn't load page, because of ajax) example.com/page/4/ but after the first click, if i click on the 5th page link over the pagination, the whole page loads (not as expected in ajax) will go to a blank page and url …
Category: Web

Change image using only CSS

I'm using the twenty fifteen theme. I have a logo set using the WP Customizer. I want to have the image change on mobile or tablet view. The breakpoint is anything smaller than 59.6875em. I'm using this code: @media only screen and (max-width: 59.6875em) { .custom-logo { content: url("https://www.example.com/example/wp-content/uploads/Logo_Wide_2x.png"); width: 300px; } } It works in Chrome but not Firefox. I've tried adding :before and :after and adding an a tag, as suggested on other answers, but none of that …
Category: Web

clickable toggle menu, help

I'm trying to edit the toggle menu so that instead of having to click on the icon near the menu, the menu would open up by clicking on the words instead. How to do this? I understood how to remove the icons, yet I'm not sure how to make the titles clickable instead of being a # link. the website is: http://maayanboni.com Anyone can help by any chance? that would be amazing thank you!
Category: Web

How to display title and featured image only when category is chosen

On my blog, harpoon71.com/blog, I want to display all posts under a category, and sub-categories, as a title and featured image only. I don't want to use the 'more' feature, just title and image only. In the code please assume the category is name 'camping'. I am using TwentyFifteen theme and have made a child theme. Due to being a complete novice can you tell me which file I should be looking in. Thanks
Category: Web

CSS rules that the theme gets from a function

I am trying to change the color of entry-footer in my Twenty Fifteen theme. My modifications in the child theme is overridden because when the website is rendered in a browser, WordPress outputs inline CSS generated by the Theme Customizer to the <head>, which overrides the stylesheet. Inspecting the customizer.php file, I see three relevant sections. First, the color schemes. Then, color variations are created and converted to rgba via: $color_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[3] ); $color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] ); …
Category: Web

Twenty fifteen - Theme background customization

I've been working on a website using the twenty fifteen theme because the layout is almost the same as the client's wants. But my problem is how can I change the full size background of the page for every page... It is a multipage actually and not a one page website Any help would be much appreciated..
Category: Web

Hiding site title for Twentyfifteen sidebar on (responsive) desktop display size

I'd like to hide the site title that appears on the sidebar on a twentyfifteen theme WordPress website when viewing it in a desktop display, but have it show when the display is fitted for mobile or tablet view (and a dropdown hamburger menu shows instead of a sidebar). Ideally, I'd like to accomplish this through CSS. I couldn't see any unique CSS id's or classes applied to the body when resizing from desktop to mobile, so I can't figure …
Category: Web

page not found for example.com/custom-post-name

i have created custom post type: jobs custom taxonomy : jobs_division I wanted url like Custom permalink structure: /%custom-post-type%/%custom-taxonomy%/%post-name%/ I have registered custom post type using the following code using plugin and i am using the twenty fifteen theme Every thing works fine except for i.e example.com/jobs should show all the posts but it says page not found here is the code add_action( 'init', 'boss_cpt' ); function boss_cpt() { $labels = array( 'name' => 'Jobs', 'singular_name' => 'Job', 'menu_name' => …
Category: Web

Twenty Fifteen: Adjacent posts by menu_order

I'm using the Twenty Fifteen (child) Theme and want to display the previous / next post links with the background image for my hierarchical custom post type. It is being displayed, unfortunately the order seems completely wrong. I assume this is because the post are being selected by date and not by menu order? I want the next / previous post to be like I have ordered them in the backend & menu, and it should be shown regardless of …
Category: Web

Twenty Fifteen : Wider right column for the content

I'm using the theme Twenty Fifteen on my offline site. I want to make a wider column for the content (the right column highlighted in blue here). I don't want to have a smaller sidebar. I tried to change the value of the "width" property for the class "site-content" but it broke the responsive "functionnality". Twenty Fifteen's style.css : /* Right column */ .site-content { display: block; float: left; margin-left: 29.4118%; width: 80%; /* Original value: 70.5882% */ } Thanks …
Category: Web

How to move the sidebar in TwentyFifteen to the right?

Is it possible to move the sidebar in the TwentyFifteen theme to the right using a child theme and CSS only, or does it require changes to the theme itself? The main issue I'm running into is that I can get the sidebar on the right side in either the "default" or the "scrolled" scenario, but not in both (default uses position: relative and is what you get when the page loads, scrolled is set when the page is scrolled …
Category: Web

Image not showing on page template in Twenty Fifteen-theme

I'm creating a custom template for a few of my subpages using the Twenty Fifteen theme. For some reason the linked image below won't show, even though the url seems to be correct. I've started with page.php, renamed it and added these three lines of code below the #main opening tag: <?php if ( is_page( 'om-oss' ) ) : ?> <img style="height:373px;width:83.3334%;margin:0 8.3333%;" src="<?php echo get_template_directory(); ?>/img/bil.jpg" /> <?php endif; ?> The complete code in my new template looks like …
Category: Web

using wp enqueue style to create a CSS file specifically for a page template

I am trying to create a CSS file that only works for one page template. I am trying to do it using wp enqueue style but to no avail so far. I was able to get it to work (sort of) using the following in my header.php. <?php if( is_page_template('background-slider-template.php') ) { ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/background-slider-template.css" type="text/css" media="screen" /> <?php } ?> I know that is not the proper way to I tried the following using wp enqueue …
Category: Web

About

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