wordpress-theming

changing the title of a custom Wordpress integrated page

↘锁芯ラ 提交于 2020-01-06 04:51:18
问题 When I need to add a custom page to Wordpress based site I always load the theme's header first: <?php require('../wp-blog-header.php'); include('../wp-content/themes/mytheme/header.php'); ?> Unfortunately then every custom page gets the same title (the blog's name) due to this code in header.php: <head> <title><?php if(is_home()) { bloginfo('name');} else { bloginfo('name'); echo ' | '; the_title(); } ?></title> What would be the best way to change this page title? Is there a wordpress

jQuery,and other library right order to include?

故事扮演 提交于 2020-01-06 03:20:30
问题 I have a Wordpress theme that uses MooTools and jQuery. I use jQuery noConflict to avoid conflicts with other JS libraries; this didn't help me. Can someone help me with the right order of including JS libraries on my Wordpress theme? Thanks in advance. 回答1: What you need to do is add this before your jquery code : jQuery.noConflict(); and replace all JQuery $ by jQuery . For example : jQuery(document).ready(function($) { // Code that uses jQuery's $ can follow here. }); // Code that uses

Give Wordpress custom page template a title for appearance editor

試著忘記壹切 提交于 2020-01-05 19:42:08
问题 When in Wordpress theme appearance editor, certain pages have a neat titles displayed in the right hand list for your theme files.For example page.php shows as "Page Template". This is clean and easily read. Is there any comment syntax that Wordpress uses to give these titles for my custom page template? For example, my single-video.php page could be "Video Page Template". 回答1: Yes you can. Make sure your page opens with something like: <?php /** Template Name: Text & Image */ get_header(); ?

How to “package” a theme

放肆的年华 提交于 2020-01-04 13:13:12
问题 Is there a way to package a theme in WP? When I say theme, I mean all the HTML, CSS, JS, custom post types, etc. I see these things often on sites like ThemeForest where they have a WP theme for sale. I'd like to do the same for a design of mine that has already been converted into HTML/CSS/etc. I'm just not familiar with the terminologies, so I'm not sure what to look up. 回答1: For HTML, CSS, JS : The theme files (actually PHP, CSS and JS) are found in your theme folder. Each PHP file there

How to “package” a theme

家住魔仙堡 提交于 2020-01-04 13:13:07
问题 Is there a way to package a theme in WP? When I say theme, I mean all the HTML, CSS, JS, custom post types, etc. I see these things often on sites like ThemeForest where they have a WP theme for sale. I'd like to do the same for a design of mine that has already been converted into HTML/CSS/etc. I'm just not familiar with the terminologies, so I'm not sure what to look up. 回答1: For HTML, CSS, JS : The theme files (actually PHP, CSS and JS) are found in your theme folder. Each PHP file there

How to customize get_the_post_navigation in theme

坚强是说给别人听的谎言 提交于 2020-01-04 05:57:42
问题 get_the_post_navigation() function is defined inside wp-includes/link-template.php How can I override it in my theme? 回答1: get_the_post_navigation does not utilize any filters so there is no easy way to modify or override all of its output. While get_the_post_navigation does not apply any filter itself, it does call functions that do apply filter. Specifically get_adjacent_post_link: return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post ); Hooking into that filter will

Wordpress Search Bar Result a Blank White Page

十年热恋 提交于 2020-01-03 13:31:15
问题 I have a simple search form on my blog sidebar which will search only the blogs . <form action="<?php echo get_site_url() ?>" method="GET"> <input type="search" name="s" placeholder="Click to Search" class="fld-search" required/> <input type="hidden" name="post_type" value="post"> <button class="btn-search"><i class="fa fa-search" aria-hidden="true"></i></button> </form> This is the website url : http://dev.wonder.lk/blog/ Following are the search types that I applied, Value that available in

jQuery smooth-scrolling navigation menu bar

做~自己de王妃 提交于 2020-01-03 05:51:09
问题 So I have been experimenting with RootsTheme (which uses Bootstrap), Wordpress (from Joomla! background) and Pagodabox; here's the result of it: http://ajmalafif.com/ However I am having some known issues with the navigation bar with any javascript solution that I've tried: route #1) Chris Coyier's smooth-scrolling Currently my site runs on this one. what doesn't work - for smaller screen or when browser resized, the nav will stop at awkwardly at much higher height (since it's set to offset

Remove Parallax background on brooklyn theme

青春壹個敷衍的年華 提交于 2020-01-03 05:05:33
问题 I have an Index.php file that I need to use as a custom page that I would like to have use some of the themes styles and elements Navigation, Footer, Contact Form, ETC.... The default header seems to be calling the body and its very difficult to find the parts of the header. I have been making a considerable amount of changes so the file in drive should be kept updated until I get this resolved. Currently I have the page/code working thanks to @David and the advice given in this question: run

How can I paginate WP_Query results when there's an offset?

北慕城南 提交于 2020-01-03 03:16:11
问题 EDIT: This is the current code that I'm trying to paginate. It creates a custom query that excludes the latest post, as well as all posts from one category. Pagination works fine for the most part, but the problem is that the final link in the pagination list takes me to a blank page. <section class="card-grid card-grid--push"> <main class="container container--wide"> <?php $current_page = get_query_var('paged'); $current_page = max( 1, $current_page ); $per_page = 3; $offset = ( $current