Tagged Questions
0
votes
0answers
10 views
How to make my plugin theme-independent?
I need a little help and/or consulting for my next steps. (I'm a beginner!)
I've been working on my plugin, using a Custom Post Type "Project", some help from the plugin "Advanced Custom Fields" - ...
-1
votes
0answers
18 views
I want to have the following functionality in Wordpress [closed]
I want to implement the following functionality:
A visitor fills a form.
The form will be saved in the database.
The site will show what the user introduced in a new page.
The user will have the ...
0
votes
1answer
34 views
Wordpress plugin with its own “site”/theme
I am currently starting a plugin development project and ideally I'd like the plugin to run using its own custom theme as if it was it's own separate thing.
Is it possible to include a theme within ...
0
votes
1answer
41 views
Why is the Settings API is not saving my array of options
I am writing a set of classes to easily create options pages accessible via submenus of the standard WordPress menus and a way to easily create options for said menus. The way I am wiring it is via a ...
0
votes
1answer
33 views
Why enqueue styles on hook
Why do we need to enqueue styles on a hook, why not just enqueue them straight in like this?
wp_enqueue_style( $handle, $src);
the codex page gives an example of using a hook but doesn't explain ...
2
votes
1answer
35 views
add_filter and remove_filter added before and after wp_query
I have just started with WordPress Development, and found following block of code online (in some tutorial)
function filter_where( $where = '' ) { // posts in the last 30 days
$where .= " AND ...
0
votes
0answers
30 views
How to add demo content to theme from outside plugin
I am devloping a new Wordpress theme that requires the installation of an outside plugin, called Revolution Slider. I would like to create a set of demo slider images for the user upon theme ...
1
vote
0answers
48 views
Am I not understanding plugins?
So I am trying to make it so that you can load a class from a child theme, theme or plugin using the following:
class AisisCore_Loader_AutoLoader{
protected static $_instance;
protected ...
0
votes
0answers
37 views
Trying to understand the action: save_post and an incomplete $post object
I begin with a fresh post (i.e., add New). I fetch (via Ajax) an image (read: src) from another site. In the process of saving (action: save_post) I want to PHP copy() the image to my local server and ...
0
votes
1answer
90 views
WordPress Page Reload Takes forever during theme development
OK, I'm hacking my way through my first theme (while reading Prof. WP Design & Development 2nd Ed.) and ....
EVERY TIME I change -for example- a p tag or a div tag or a css rule, when I then go ...
0
votes
2answers
1k views
Custom user profile, registration, login page with theme
WordPress user profile page uses the administration interface, and its user registration / login page is not part of the theme. I would like to
change it into the custom theme of my site
customize ...
2
votes
1answer
40 views
Where to put archive-{post-type}.php
I have a plugin that adds a custom post type for a website I'm building. I am using the_content filters to change how a singular page looks, and it works great, allowing me to keep everything ...
0
votes
1answer
49 views
Widget HTML Display Problem
Hi I have created a plugin that places a Google Translator into a text widget in Wordpress. I have setup shortcode to do this - and the shortcode seems to be outputting the correct HTML, except that ...
1
vote
3answers
156 views
Is there any way to have Featured Text, as opposed to Featured Image?
I need to have Featured Text displayed on my category page, as well as a Featured Image. The Featured Text can not be in the Post at all (just as a Featured Image is not in the Post).
Does anybody ...
2
votes
1answer
312 views
Show a user their recently viewed posts
I am working on a project that showcases a number of products, so i'd like to add a "recently viewed product" selection that keeps track of the last 5 or so viewed products or posts.
I saw this ...
0
votes
1answer
83 views
Breadcrumb is not generating the correct post page url
I have created a custom posts type cities and the code for its deceleration is register_post_type('City',$args);
$labels = array(
'name' => _x('Cities', 'post type general name'),
...
-1
votes
3answers
196 views
Can I change header.php of current theme through a plugin function?
I need to add some html into the header.php but instead of directly changing the header.php of my theme or creating a child theme, how can I do it with just actions and/or hooks?
4
votes
1answer
84 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
4answers
164 views
WP_Query returns no results
I'm using wp_query to create a custom query that retrieves search results but it is returning 0 results. Here is the code:
$query = 's=the&posts_per_page=5&paged=1';
$custom_query = new ...
16
votes
3answers
861 views
Where to put my code: plugin or functions.php?
Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php?
There are many cases and many debates about that topic, mostly because there are ...
-1
votes
1answer
37 views
Site is setup statically - how to make it content managable?
This is probably quite a basic question, but I have my site setup statically in WordPress, all I am trying to figure out now is how to add a new section to the WordPress backend where all the content ...
0
votes
1answer
59 views
Create and style menu
I have been assigned with the task to create a menu that can be added or removed from wordpress admin. Right now the menu is hard coded into the templates. But I want to use default menu function ...
2
votes
5answers
236 views
How do I make a theme “plugin-ready”?
How do I revise a theme so that I can publish my event hooks and anyone can build a plugin to add new functionality easily to my theme?
0
votes
0answers
10 views
Is there a way to have a plugin create a custom theme format? [duplicate]
Possible Duplicate:
How do I add a new custom post format?
Programmatically, I'm wanting to make a special affiliate offer theme format (but via plugin) that lets one use any theme, but if ...
-1
votes
2answers
396 views
How can I create a user generated photo wall
I'm looking for a way to create a user generated photo wall. Like a memorial site so to speak. I would have a big header image up top, than people could submit their own photo and it would post below ...
0
votes
1answer
104 views
Specify template file for custom post type outside the theme [duplicate]
Possible Duplicate:
Custom Taxonomy in plugin and template
I want to specify a template file for a custom post type in a plugin folder. Commonly, WP would call automatically the ...
0
votes
1answer
100 views
custom comments form for custom post type
Hello everyone I am creating a theme dedicates to hotels display and booking in which I have created a custom post type 'Hotels' so now I want a mechanism to book the hotel rooms and a "book now" ...
4
votes
2answers
182 views
Add custom user capabilities before or after the custom user role has been added?
Should custom user capabilities be added before the custom user role has been added, or the other way around?
add_role() asks for and array of $capabilities in the third
parameter of the function.
...
1
vote
0answers
53 views
gallery option is not available in media upload box in costum theme option page
Hi everyone I am creating a theme in which I have to created a sponsor upload image gallery on the admin panel in theme option page and its slide show on the front panel for this I follow tutorial to ...
8
votes
2answers
1k views
Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
Has anyone used autoloading and/or PHP namespaces within a plugin or theme?
Thoughts on using them? Any harm? Pitfalls?
Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know ...
0
votes
1answer
106 views
Creating a Link Text like Submit Button in Admin Page
I'm making an admin page for my plugin and I'd like to make a text link designed like the form button of admin pages.
I tried this but didn't work well.
<a href="" cless="button-primary" ...
1
vote
1answer
447 views
How to use filter hook 'post_updated_messages' in coherence with action hook 'save_post'
I am trying to send out e-mail, SMS and IM notifications to group members of this WordPress website, whenever a WordPress page in their user group has been published/updated.
I figured using the ...
2
votes
1answer
353 views
How to set a fall back template for a custom post type in a plugin?
My custom plugin creates a custom post type, and I want to theme my own "single-my_custom_cpt.php" file. However, I want to store it in my plugin folder, and allow that it be over-written in the ...
1
vote
1answer
26 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 ...
2
votes
1answer
63 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 );
...
0
votes
1answer
44 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
78 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 ...
0
votes
2answers
57 views
Plugin is not generating title tags on any pages or posts
I am using the Wordpress SEO plug in and for some reason the plug in is not longer adding title tags to any posts or pages. I just updated my theme, and something has changed between this version and ...
0
votes
1answer
331 views
Saving multiple fields as array
I'm adding a settings section to a theme that will allow the user to enter testimonials which will be randomly displayed on the site. Each testimonial has 2 fields, author and testimonial, I've ...
1
vote
1answer
236 views
Add something to beginning of content with add_action('the_content')?
I'm using add_action('the_content', 'myFunction', 10) to append data to the end of the content. How can I place content at the beginning of the content?
3
votes
1answer
668 views
wp_remote_get doesn't work with secure connections https?
I'm querying the twitter api when I use non secure connection http:// it works fine no wp_error (but twitter exceed limit error) but when I use https:// it works in my browser I can see the json and ...
0
votes
2answers
3k views
How to get the path to the current theme?
This code is used to get the directory of the current plugin: plugin_dir_url( __FILE__ ).
What should I use to get the directory of the current theme?
1
vote
2answers
62 views
Beginner advice
Hi I am a self tought web developer with a year experience in using html/css/javascript/ and only just recently learned php/mysql for about 4 months.I have never used a cms before and now I was ...
0
votes
1answer
230 views
wp_nonce_field displaying twice
I have wp_nonce_field in my code but it's creating two instances to the html code for some reason, one where I'd expect it and another at the start of the entry. Is this correct or am I doing ...
0
votes
1answer
43 views
Adjust query on single
I am building an event manager. One of the template files I have is events-single.php which displays single events. At the bottom of this I have next and previous events using next_post_link and ...
3
votes
2answers
503 views
Should Plugin Folders Include a Blank index.php File?
WordPress itself, in the wp-content folder, includes an empty PHP file which looks like this.
<?php
// Silence is golden.
?>
Should plugins include an empty file like this as well to stop ...
6
votes
1answer
621 views
What is the advantage of using wp_mail?
What is the advantage of using wp_mail() over mail(). Codex says they're similar, but they seem to be very similar.
3
votes
1answer
409 views
What is the difference between strip_tags and wp_filter_nohtml_kses?
What is the difference between strip_tags and wp_filter_nohtml_kses. I tried to figure wp_filter_nohtml_kses from the source but it looks like it does something a bit more complex than strip all html ...
4
votes
1answer
385 views
What is the difference between esc_html and wp_filter_nohtml_kses?
What is the exact difference between esc_html and wp_filter_nohtml_kses. Everywhere I look says that both strip all the html, the only difference I can see is to do with exactly how they do this. Does ...
0
votes
1answer
296 views
unable to wp_enqueue_script('suggest');
i'm not able to enqueue the built in autosuggest script in my wordpress theme.
wp_enqueue_script('suggest');
my current workaround for that problem is to deregister, register manually an then ...