Themes create the public (front-end) interface for a WordPress site.

learn more… | top users | synonyms

6
votes
2answers
16k views

When to use add_action('init') vs add_action('wp_enqueue_scripts')

In my theme's functions.php, I'm calling an add_action in order to gain a measure of control on where jquery is loaded (in the footer along with my theme's other scripts). The problem I'm having is ...
3
votes
1answer
1k views

Why to check if function doesn't exists in functions.php?

I see in the twentyeleven theme, before most custom functions they check if it exists <?php if ( ! function_exists( 'twentyeleven_comment' ) ) : function twentyeleven_comment( $comment, $args, ...
1
vote
2answers
268 views

Select menu on browser resize

I have seen on some wordpress themes that if the browser width is less, the normal menu becomes a select menu. Can someone tell me how it is done? I know there is a plugin for that, but I want to ...
0
votes
2answers
207 views

How to enqueue scripts depending on post formats?

So I'm trying to enqueue scripts used for some post formats like video and audio and I could find a way to check what post formats are going to be shown on the page. I tried print_r on some global ...
2
votes
1answer
1k views

Which theme foundry has clean coded themes, where code is poetry [closed]

I'm looking to find a theme foundry (ie. woothemes, elegant themes) that has themes that are very well coded; where "code is poetry". To be more precise, I'm looking for themes coded in "the wordpress ...
1
vote
1answer
38 views

Is there some way to provide the user a list of existing content in a CPT

I was looking at the way WordPress uses "Or Link to Existing Content" under the link button in the editor and I am wondering if there is any way I can use that code to allow users to select a page to ...
0
votes
2answers
455 views

How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?

I am using the Starker Theme as a foundation to build my custom WordPress theme. The Starker Theme comes with a loop.php file for setting up the main loop. I decided to use the loop.php file to ...
0
votes
1answer
1k views

Should I use add_filter for functions in function.php of the theme?

I have written few functions in the function.php file of the theme. Should I use add_filter function for those functions?
0
votes
1answer
913 views

How to develop a menu like wwe.com?

I would like to design and develop a WordPress menu like wwe.com's menu where it has multiple columns, images and a video section in drop down menus. I can create a multi-column menu, but I'm not ...
1
vote
4answers
1k views

Widget items disappearing

if ( function_exists('register_sidebar') ) register_sidebar(array( "name" => "Top Widget Area", "id" => "topWidgetArea-$i", )); I just create a new sidebar with this. ...
0
votes
1answer
96 views

Custom image size vs CSS sizing

I am developing a theme which will have 2 configuration options for the slideshow in the header; a full width version and a half width version. The theme is also responsive and so I am trying to ...
0
votes
1answer
2k views

Custom nav menu not showing

I want to make a custom menu that will be a select-box, I registered a custom menu: add_action( 'init', 'register_my_menu' ); function register_my_menu() { register_nav_menu( 'primary', ...
0
votes
1answer
74 views

ajax response -1 in wordpress theme

I am using ajax in wordpress theme,but ir response -1,why? how to correct this? function videospage(cnt) { var pageno=cnt; jQuery.ajax({ type: "POST", url: "<?php echo ...
1
vote
1answer
4k views

file_get_contents Not allowed in Themes?

I'm using file_get_contents in a theme development (in a widget of the theme). However the theme check plugin gives me following warning: WARNING: file_get_contents was found in the file file.php ...
3
votes
4answers
127 views

How do I make my wordpress page more friendly for mobile viewers?

My basic question is How do I make my wordpress page more friendly for mobile viewers? I have seen some answers such as wptouch, wordpress mobile pack, and mobilepress http ...
2
votes
1answer
783 views

How to execute conditional script when on new customize.php (Theme Customize) screen

The new "Customize" theme screen is a welcome addition in WordPress 3.4, however, I find it conflicts with my method of loading scripts loaded in the footer: In functions.php if(!is_admin()) { /* ...
2
votes
1answer
61 views

What page should I use for a contact form?

I want to make a theme with an about page and a contact form, Should I make a custom page meant specifically for it? (the blog is ment for mobile and I'm not looking for most flexibility, the page ...
1
vote
2answers
2k views

How can I add custom text styles to the visual text editor?

By default an author can select from Paragraph, Address, Preformatted, Heading 1, etc.. As an example I'd like the author to have the ability to visually wrap selected text in a tag, without ever ...
1
vote
2answers
212 views

How should I store global information such as a phone number so that it is editable through the CMS?

Right now I have a p element in header.php containing the address and phone number my client wishes to use for contact info. How can I set this up so that it is editable through the WP admin area so ...
1
vote
2answers
49 views

What is the right way to make custom main page?

I am making a custom theme and I want the main page to be a gallery, not a blog, is it right to change index.php to a gallery page (content wise) or should I use another page?
2
votes
1answer
108 views

What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]

What is the difference between these two methods of writing $ instead of jQuery in WordPress (function($) { // $ Works! You can test it with next line if you like // console.log($); })( jQuery ); ...
4
votes
5answers
7k views

Is it feasible to build and update a Wordpress website offline?

It appears that Wordpress is designed to have websites constructed and maintained online - in the live website. I see some posts here that indicate some people are doing such development offline - in ...
4
votes
1answer
725 views

Customize WordPress>Error Page

Is there a way to customize the WordPress>error page template so that the user isn't shown just a blank screen with text? I'm not talking about 404, but when WordPress displays an error. I'd like to ...
0
votes
1answer
52 views

Default PHP document / names needed for a Wordpress theme?

I am hosting my own version of Wordpress, and I'd like to do a custom theme for it to suit my website. However, with so many bits and pieces of examples on the Internet, I'm not really sure how many ...
0
votes
1answer
100 views

How to convert that page to a wordpress template? [closed]

Couple of days I am trying to integrate THAT page in wordpress. I converted it to wordpress theme but can't make the images to loads. All I see is the loading circle. I changed the path in javascript ...
0
votes
1answer
78 views

How to determine (via php) if site is using a static home page?

I have a script that needs to know if the site is using a static home page. In other words, at "Settings > Reading > Front Page Displays > a Static Page __" Is there a a get_option() or method call ...
1
vote
2answers
85 views

Where to find the code that redirects requests on the static page URL to the home page

As an example, let's say I set my "About Us" page (slug: about-us) as my home page static page. Upon doing this, when someone requests mysite.com/about-us, WordPress does a nice redirect to the home ...
1
vote
1answer
1k views

Custom Taxonomy Tag Search

I have an existing WordPress search function, what I'd like to be able to do is extend the search to the tags from my custom taxonomy...how do I do that? <form method="get" id="searchform" ...
0
votes
1answer
349 views

How do I display a greyed out next_post_link when there is no next post

Wordpress hides the next and previous post links if there are none, but for the sake of visual consistency I'd like to serve up a greyed out version of the link when there is no next or previous post. ...
0
votes
2answers
810 views

How to detect /category and /tag base pages?

In a theme I'm building, I have this structure for detecting what type of page something is. However, if I visit mydomain.com/category/ or mydomain.com/tag/, all I get is the "nothing found" message I ...
0
votes
1answer
70 views

Wordpress Beginer to Guru [duplicate]

Possible Duplicate: Where is it better to start learning how to develop for Wordpress? Hi I have recently started learning WordPress threw these video series WP101 on wptuts+ and after that ...
0
votes
1answer
982 views

What is the difference between Twenty eleven & roots framework?

Just amazed by the usability of Twenty eleven wordpress theme & extensibility of roots theme http://www.rootstheme.com Now in conflict. I want all twenty eleven features to use on extensive ...
0
votes
1answer
3k views

WP_Query with custom post type ID

This code isn't echoing out anything, even though I'm 100% positive $mixtape_id is set to an integer which corresponds to one of the posts within the 'mixtapes' custom post type $query = new ...
5
votes
2answers
159 views

Template for individual post designs

I browsed through the suggested posts, and couldn't find anything that was exactly answering my question. I apologize in advance if I'm reposting something obvious here, but there you have it. I want ...
0
votes
1answer
108 views

Getting a WordPress Debug Strategy

I have been reading up on debugging. I watched Chip Bennett's video on wordpress.tv and was inspired to take debugging seriously. What I have found in my reading up though has confused me a bit. I ...
2
votes
3answers
915 views

new theme permissions don't allow me to edit

When I use wordpress to install a new theme it creates the permissions and ownership in such a way that I can't edit the files via FTP. Any ideas? (Using Plesk)
0
votes
1answer
435 views

How to get the theme index.php listed in appearance editor

When viewing my theme files via "Appearance > Editor", the index.php file that's listed there is an index.php that's inside a subfolder of my theme directory, not the main index.php file that resides ...
0
votes
1answer
92 views

Identify current wordpress theme

I want a theme very similar to these two websites. I am a newbie to wordpress and am trying to understand what theme is it. It looks like both the sites have a similar theme. Is there a way I can fin ...
3
votes
3answers
3k views

How to remove duplicate link from add_menu_page

In the theme admin menu below, the "MyTheme Menu Label" is being duplicated twice on the sidebar menu, once for the main menu link and again for the first submenu link. How can I remove the 2nd ...
1
vote
2answers
664 views

Posts Page Featured Image [closed]

I have created a theme that uses a featured image on every page. In settings, I have setup my "Posts Page" to be "news"...how do I get the featured image from "news" to display? The following will ...
0
votes
2answers
1k views

Add submenus to Theme options menu

My theme currently has a single menu on the left hand sidebar of WP admin. I want to include submenus on that menu. How can I add, for example, a single submenu item to the "Theme Options" menu ...
2
votes
3answers
3k views

Get list of months with posts

I am trying to add a filter on my custom theme based on post month, similar with the archives but with some differences. What is the best way to get a list of months in witch we have posts? Thanks, ...
1
vote
1answer
73 views

How do you remove plugin edit option?

I would like to remove the edit option for all plugins on a wordpress site. Is there a hook/filter for doing this? It would be preferred to do it from the theme's functions file, rather than try to ...
2
votes
1answer
667 views

Best practices: Custom theme sidebar menu - hardcode or widget?

Is it best to hardcode a sidebar menu using functions.php or sidebar.php OR use the custom menu widget? Are there times when each is appropriate?
-1
votes
1answer
165 views

Creating custom function in wordpress to return data from database

I have created a custom image uploader for my wordpress admin panel and need to retrieve the data from the wp_options table. I have wrritne the below function: //function to get all slider images ...
5
votes
3answers
2k views

What filters are applied to the_content function?

How does WordPress convert raw data from the database to a readable format in the_content function? I've noticed that it applies the_content filter, but what does the_content filter do?
0
votes
1answer
391 views

How to change database values on theme update

I have a theme released into the wild but have not prefixed the post type appropriately. Yes, I know, it's a shame and I regret it :( So, I am currently using acme as the post type name, but I' like ...
-3
votes
1answer
407 views

Custom GD Star Ratings Stars [closed]

I have some custom stars that I would like to use for GD Star Ratings.. how do I load my custom star image?
0
votes
1answer
451 views

Add tags to pages

I'd like to be able to add tags to my pages just like I can with posts. What would I need to do to enable the tag editor/entry for the page editor?
3
votes
1answer
345 views

Create “File-less” Page Template in Functions.php

(By "Page Template," I mean a theme file with the "Template Name" header that can be selected in the "Template" dropdown field on the page admin.) In multiple instances, I've built page templates ...