wordpress-theming

Wordpress Bones Theme CSS and JS Versioning

那年仲夏 提交于 2019-12-01 20:26:13
I have a website that has been built using the bones wordpress theme. No matter what I do I can't seem to get versioning to work on css and js using the wordpress enqueue functions. Is there something in bones, maybe a filter that I can't find that is stripping the versioning out? Any suggestions are appreciated. Thanks You're probably lucky that it's not there by default, most people try and remove it as it defaults to Wordpress version number (why?). I found the best way to add it is to add the my_wp_default_styles function to your functions.php. Also a neat trick is to check the last

jQuery .html() not displaying any data in ie7, but ie8 works

♀尐吖头ヾ 提交于 2019-12-01 19:06:39
So who doesn't have issues with ie7 ? It seems that I cannot get ie7 to recognize some data. I have created a wordpress theme for a client of mine, and this allows them to put in extra information in the wordpress meta fields through the admin so they can display extra info. I have written a small jQuery script that looks at an images alt and title to gather this info and write it into a div. Below is my script. <script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function(){ var title = jQuery('.attachment-post-thumbnail').attr('title'); var alt = jQuery('.attachment-post

How to remove woocommerce tab?

℡╲_俬逩灬. 提交于 2019-12-01 17:05:16
问题 the products in our woocommerce shop don't need any of the default tabs so I have managed to disable them being that I only need to have the product description below the product however, while I want to keep the actual description, I believe the tab itself is redundant since there aren't any other tabs. Basically, I want to remove the tab's & title altogether but keep the content box below it without modifying the woocommerce core php template file. Is there a way to add a filter to my

If first post, style differently — Wordpress [closed]

三世轮回 提交于 2019-12-01 12:50:19
I need the first post that was ever posted to be styled differently. Is there a way that I can see if the post is first, and then change its contents? I currently have a div in all my posts. This needs to be replaced with different div . Apparently the following piece of code can help, but I'm not sure how to implemenet it: <?php if (have_posts()) : $postCount = 1; while (have_posts()) : $postCount++; ?> I'm new with WordPress so not entirely sure how this could work? Append following codes after yours: <?php if (have_posts()) : $postCount = 1; while (have_posts()) : $postCount++; ?> <?php if(

wordpress 3.8.1 category page 2 error 404 not found / custom post type

拜拜、爱过 提交于 2019-12-01 08:54:49
first the problem, then the tries. Problem The problem is that i get a 404 NOT FOUND error if i visit another page than the first category page. On the category page i have a normal pagination. The first site works. ( http://mypage.com/category/properties ) After i click on the "Next page" button I'm on the page http://mypage.com/category/properties/page/2 and got the error 404 NOT FOUND. But why? Tries First I tried this Question Custom Post Type and Taxonomy pagination 404 error , but the exclude_from_search and the queries below doesnt work. I tried this, too. http://wordpress.org/support

wordpress 3.8.1 category page 2 error 404 not found / custom post type

蹲街弑〆低调 提交于 2019-12-01 05:39:02
问题 first the problem, then the tries. Problem The problem is that i get a 404 NOT FOUND error if i visit another page than the first category page. On the category page i have a normal pagination. The first site works. (http://mypage.com/category/properties) After i click on the "Next page" button I'm on the page http://mypage.com/category/properties/page/2 and got the error 404 NOT FOUND. But why? Tries First I tried this Question Custom Post Type and Taxonomy pagination 404 error, but the

Wordpress admin-ajax.php 404 bad request

China☆狼群 提交于 2019-12-01 03:52:53
问题 I have a strange and frustrating behaviour of wordpress admin-ajax.php file, when i make an ajax request it returns 404 error bad request. (function( $ ) { var ajaxscript = { ajax_url : 'mydomain.com/wp-admin/admin-ajax.php' } $.ajax({ url : ajaxscript.ajax_url, data : { action : 'cart_clb', id : 1 }, method : 'POST', success : function( response ){ console.log(response) }, error : function(error){ console.log(error) } }) })(jQuery) And inside my functions.php add_action( 'wp_ajax_post_cart

How to include styles.css in wordpress theme?

陌路散爱 提交于 2019-12-01 01:35:19
I am trying to include my styles.css stylesheet in a wordpress theme I am trying to develop (my first one). Question: How would one go about including it? I know putting the following code in my header.php file works: <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"> however I would rather like to include it through functions.php like so: <?php function firstTheme_style(){ wp_enqueue_style( 'core', 'style.css', false ); } add_action('wp_enqueue_scripts', 'firstTheme_style'); ?> yet this doew not work at all (When i remove the line from my header.phps 'head', my styles are not

How to include styles.css in wordpress theme?

扶醉桌前 提交于 2019-11-30 19:58:41
问题 I am trying to include my styles.css stylesheet in a wordpress theme I am trying to develop (my first one). Question: How would one go about including it? I know putting the following code in my header.php file works: <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"> however I would rather like to include it through functions.php like so: <?php function firstTheme_style(){ wp_enqueue_style( 'core', 'style.css', false ); } add_action('wp_enqueue_scripts', 'firstTheme_style');

How to add custom post type archive to menu

落花浮王杯 提交于 2019-11-30 13:00:29
问题 I have been searching for weeks and I still haven't found a proper solution to this problem. I am writing a Wordpress Theme. I have a custom post type called Works. I would like to add my Works archive to my menu and have it as well as it's posts highlighted when I access them. I can access my archive and posts on the following links Works archive: /works/ Works single post: /works/postname/ My solution so fare have been to name my archive-works.php template file with a template name (Work