0
votes
2answers
891 views

How to sort queried pages by an array of page ids?

I'm creating a one page wordpress website, and I need my 'home', 'about', 'portfolio', 'services' and 'contact' pages to all be on my front page. I created the following page template for my front ...
2
votes
1answer
4k views

Filter front page posts by category

I have three categories (news, pics, vids), but I have all of them showing up on my front page. I would just like the front page to have the news category (and possibly uncategorized category) to show....
1
vote
3answers
105 views

When to use actions and when to use filters

I'm trying to understand where to use filters and where to use actions. Suppose I have a query in a plugin, which later add on modules might modify to change the results of the query, thus modifying ...
0
votes
2answers
503 views

Pagination for two loops

I know this has been discussed before but I can't seem to make it work with any of the solution posted in other topics. How can I make pagination to work on a loop like this: <div id="...
0
votes
1answer
429 views

Theme post editor does not have Visual & Html tabs and all buttons?

My theme (which I made myself several years ago based on WP TwentyTen) is only showing a basic post editor (& I cannot remember whether this was so originally or not!). How do I get the post ...
2
votes
2answers
465 views

Custom style on profile options page

is there any way to style the profile page on wordpress ? I will like to add something like: Start of the page just below the <h2> tag <div id="normal-sortables" class="meta-box-sortables ...
1
vote
1answer
256 views

How to dynamically save a selected option from page “Templates” selectbox?

When I select a template for a page from the "Templates" selectbox, the selected item gets “value=selected” only after I hit save draft/publish/update. <option value='template-gallery.php' ...
0
votes
1answer
614 views

AJAX function not working [closed]

One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
0
votes
3answers
9k views

Custom Taxonomy Images with Advanced Custom Fields

I've created a custom Taxonomy for a Custom Post Type, and created five or so terms within the taxonomy. I've created a single image upload and assigned it to the custom taxonomy, and uploaded images ...
0
votes
3answers
730 views

How to check the array values, what WP_Query has brought to me?

I have two questions in a row: How to check the array values, what WP_Query has brought to me? If I get 10 posts in cat=3, then I want to get only 5 from them, and then want to echo them ...
3
votes
1answer
2k views

One metabox for multiple post types

I have this code function add_custom_meta_box() { add_meta_box( 'custom_meta_box', // $id 'Custom Meta Box', // $title 'show_custom_meta_box', // $callback 'page', // $page '...
1
vote
1answer
5k views

How to split the categories of subcategories with thumbnails

This is the code I use to display all product categories with thumbnails: <?php $cats = get_terms('product_cat', array( 'hide_empty' => 0, 'orderby' => 'name' )); ?> <div class=...
0
votes
1answer
655 views

WP_Query post at custom position

Lets say I have a custom query which based on two custom post types: $wp_query = new WP_Query(array( 'post_type' => array('post-type-1', 'post-type-2'), 'post_status' => '...
0
votes
1answer
86 views

Choose template depending on URL

I have the following basic page setup: xxx.net/ -> static homepage xxx.net/blog/ -> blog page with loop showing all posts xxx.net/gallery/ -> gallery page with loop only showing posts that are ...
3
votes
1answer
2k views

How to make a page template to list all galleries?

I'm trying to code a theme where I'll have a universal gallery page. Basically like: http://www.engadget.com/galleries/ However I'm at a loss for what I'd use to call all the galleries. I need the ...
2
votes
1answer
331 views

Allow guests comments on single post

I would allow guests comments who are not registered yet to comment only one single post. Other posts have to be commentable just for registered users.
1
vote
1answer
2k views

Broken image multisite

I've two wp sites (multisite) with the following config: 1# (Main site) Home: http:// www.mysite.com Upload Path: wp-content/uploads Fileupload Url: http:// www.mysite.com/wp-...
0
votes
0answers
20 views

Showing shortcode of contact form instead of displaying form [duplicate]

Possible Duplicate: Using short codes I have a template for contact page and I have a post for the contact form. I am echoing that post in the template but it is showing short code of that ...
0
votes
2answers
231 views

WP is not allowing me to post Macintosh .pages documents to my blog

I'm completely green when it comes to website development, therefore, if you do have an answer for me could you please explain it in laymen's terms. My problem: I just created a blog post using ....
3
votes
1answer
606 views

Custom Post Type - Same Post Name, Different Post Type

I have 4 Custom Post Types: Services FAQs Prices Before and After I want to be able to have the same post names within each of these post types, example: Services Skin (example.com/Services/...
0
votes
1answer
108 views

Making a Custom Post Type Publish Loop

I want to re-publish all previously published products of a custom post type. Let's say the post type is "events" This is what I was thinking something like this: $args = array( 'post_type' => '...
1
vote
0answers
119 views

WordPress Not Using Template Files After Permalink Update

I have a really weird issue that just occurred on a client site. I updated the permalink structure from /%category%/%postname%/ to /%postname%/ and suddenly my pages don't respect templates and are ...
1
vote
1answer
31 views

Disable block with taxonomies at post page

I am developing an events manager for Wordpress. I have post_type = 'event' and taxonomy 'event_place' And I want delete block with taxonomy select in post page, because user can do it at custom ...
0
votes
1answer
142 views

Extending a CPT by Created by another plugin

I'm using WooCommerce for my store, and I need to be able to extend the Coupon post type... I need to add a selectable attribute of membership_term ... How do you extend a CPT created by another ...
3
votes
3answers
100 views

reason of splitting theme files to multiple files

I can create my theme without splitting it into separate files. Why do theme developers split WordPress theme into a few single files like header.php sidebar.php and etc?
4
votes
1answer
95 views

Update exisiting site to 3.5 release candidate

I have an existing site that I want to update to 3.5 now, because I want to see if my plugins and themes work in it. I don't want to wait for the full release (when I'll be able to automatically ...
1
vote
3answers
1k views

shortcode_atts - one URL variable not working

I have devved a small plugin based on a shortcode. Here's a stripped down version of the code for the shortcode itself: function lishortcode($liatts) { extract(shortcode_atts(array( "li" =...
1
vote
2answers
16k views

Get the category from an ID of a product?

I have the ID from a product (1345) how can i get the category name of that specific product? I try $post_categories = wp_get_post_categories( $post->ID ); print_r( $post_categories ); but it ...
1
vote
0answers
349 views

Category archives with monthly pagination

How would I go about doing the following: I need to setup a prev/next type pagination where posts within a category archive are split into months. For example, if I navigate to the News category, I ...
0
votes
1answer
6k views

How to filter all products by products_tag (woocommerce )

I'm trying to retrieve the thumbnails for only certain products of my woocommerce, using products_tag, this code is showing all products : <ul class="products"> <?php $args = array( '...
2
votes
2answers
4k views

How do I programmatically generate a 404?

How can I get something like this to work? // in a plugin / theme: // This imaginary function will make WordPress think that the // current request is a 404. // Ideally this function could be ran ...
0
votes
2answers
1k views

How to remove tag base from permalinks

How can I remove the tag base that WordPress creates by default in permalinks? Any reason why it would be there in the first place?
0
votes
1answer
2k views

the_post_thumbnail('my_image_size') always outputs full image

I'm developing a custom theme that uses several custom image sizes defined in my functions.php like this: add_theme_support('post-thumbnails'); add_image_size('featured_thumb', 175, 120, true); I ...
1
vote
1answer
57 views

Why do pages in Wordpress have a hierarchy but menu's also have a hierarchy?

I have a hierarchy of pages in Wordpress, what does this hierarchy mean? Since I also have a hierarchy of menu items which shows the menu. Whats the difference and why do they both have a hierarchy?
1
vote
1answer
655 views

Exclude custom post type from list

<?php $custom_post_types = get_post_types( array( '_builtin' => false, 'public' => true ), 'objects' ); foreach ( $...
0
votes
2answers
1k views

How to avoid duplicate Url for the home page

I am working on this web . I need to fiugure it out on how to avoid repeating the URL in the home Page. The Home page has actually two url creativesquaresummercamp.com/ creativesquaresummercamp.com/...
2
votes
2answers
2k views

WordPress Database Charset/Collate

Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?
0
votes
1answer
2k views

Search another database with wp_query using new wpdb

I currently have a simple wp_query search working on my wordpress site. I now want that same search to look for results in it's own database and another one on same server. I found that I could use ...
1
vote
1answer
2k views

W3 Total cache “empty all caches” and no stylesheets render [closed]

I have the w3 Total cache plugin installed and so far its been great as I'm sure you will all agree, so thanks to the author for an amazing plugin. However, I used the "empty all caches" button on the ...
1
vote
1answer
242 views

Send email on Job Dispatched from WP e-commerce [closed]

I sell a product using WP e-commerce that is downloadable only after I check some information that the customer sends me. After checking the information I would like to go to the WordPress dashboard, ...
0
votes
1answer
44 views

Plugin options page - save two related options as one entry

I created an options page for my plugin where the user can specify image dimensions which will be saved for later use. So far the image dimensions are entered by the user in one input field like ...
0
votes
3answers
979 views

Search box with field hidden till drop down selection is made

I have a search widget with a drop down populated with my custom taxonomies. I need one of the other input fields to only show when a certain taxonomy or its children are selected. Before you say ...
0
votes
1answer
868 views

Redirect based on log-in status per JavaScript

I want to check if a user is logged in. If he is, I want to redirect him to page A, and if he isn’t to page B. The redirect should happen per JavaScript after a button has been clicked – so I need ...
0
votes
1answer
98 views

Putting a Category of posts under a Page

I have a website say mysite.com and there is a blog mysite.com/blog.When i post a new post under blog category its appears like mysite.com/newpost.I want the posts under blog category to be displayed ...
2
votes
1answer
475 views

Add script to footer - on post editor

How do you add a script on the footer of the post editor ? I'm adding a meta box under the post editor and I need to include a javascript before the closing body tag (on the footer) How do I achieve ...
3
votes
2answers
844 views

Add copies of the same text widget instance to multiple sidebars

Note: This is not the popular question about how to create multiple instances of a widget. I have a text widget that I am using to display "business hours". This text needs to go in multiple ...
0
votes
1answer
2k views

issue displaying variations in custom template using WPeC 3.8.9.2

I’m having trouble displaying variations in a custom built template, each time i call the wpsc function have_variation_groups() within my loop i get the following php error commerce/wpsc-includes/...
0
votes
0answers
21 views

Get attachment id from thumbnail url [duplicate]

Possible Duplicate: Turn a URL into an Attachment / Post ID I got a thumbnail url, for example http://www.mysite.com/wp-content/uploads/blume-beispielbild-300x225.jpg I know I can find the ...
0
votes
2answers
830 views

How can I use AJAX with check-box categories?

How can I build a search filter (something like this) with WordPress? I have a custom post type name: "Locatii". It is a custom post type with categories. Ex: Cat 1 , Cat 2 ... and so on. How can ...
0
votes
2answers
707 views

Multi post thumbnails doesn't return anything

I am using the multi post thumbnails plugin. I have a custom post type "artist" who has a logo. In the loop I want to echo out the following: $logo = MultiPostThumbnails::get_post_thumbnail_id('...

15 30 50 per page