A function is a sequence of program instructions that perform a specific task. It is packaged as a unit that can be used wherever the according task should be performed.
0
votes
1answer
18 views
Need a functions that adds (adm)/(mod) if current user is admin/moderator right after their username
When a moderator/admin leaves a comment I want them to stand out and not be like any other comment. I have this piece of code so far but I dont think will do any good
<?php $current_user_is_a_mod ...
0
votes
0answers
36 views
How to add X number of products to woocommerce cart at once
I am trying to add x number of products input and button to my catalog page so I can select a number, then hit add to cart.
Is it possible to add in this function? The user will provide a number ...
1
vote
1answer
102 views
How to add default images into theme customizer image control?
I am trying to figure out how I can pre-load a theme customizer image control with images I have selected. Is their a way to point the control to a directory so they automatically show up in the ...
0
votes
1answer
13 views
How can i remove the icons, or change that icons
How can i remove wordpress multi site, or how can i change that icon?
http://i39.tinypic.com/6z206a.jpg
Thanks in advance
-1
votes
0answers
39 views
Upload image functionality in menu admin
I want to create a custom plugin or function inside functions.php where it allows you to select an image from default Wordpress media library and allocate for each menu. I then want this to be passed ...
0
votes
0answers
34 views
Wordpress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
I have been working on a theme for a few days and when I realized my JS file for my theme customizer wasn't updating I decided to clear the cookies and cache, and wow that was problematic. As soon as ...
1
vote
1answer
21 views
“is_new_day()” alternative for years?
I don't believe there's a is_new_year() function in WordPress, as an alternative for is_new_day(). I'm trying to display the year only once for each set of posts, what would be the best way to do ...
1
vote
1answer
81 views
Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)
I'm trying to use wp_redirect() to redirect searches to a format that I have established in .htaccess. Unfortunately, I'm running into some problems doing this.
I need to redirect search to a series ...
0
votes
0answers
11 views
If user removes section with theme customizer I want it to add padding to footer
I added the ability to the theme customizer for the user to remove a section that is above the footer. The issue is when the section is removed it is causing the links in my footer to move up.
How ...
0
votes
0answers
24 views
Problem with function not executing
I am sorry for the long post but I wanted to be thourough in hopes someone could help me figure out this issue. I have been trying to get it working for 2 days with no such luck. I would appreciate ...
0
votes
1answer
12 views
Changing the post date and time with function
What function can be used to update a post's post date and time to the current date & time?
1
vote
0answers
29 views
Way to add captions to gallery images by code
I am creating posts by using wp_insert_post function. It works fine as I provide values in array required. Sometimes it is required to create a post having gallery. Without any problem, it also works ...
0
votes
1answer
46 views
Custom post type isn't working
I just built up a beta environment for testing my new Wordpress site. I didn't migrate the database; I did my own installation again and ported over my theme (it's a simple theme) to my new instance. ...
0
votes
1answer
30 views
How to change pagination base from slash to query form?
Can this function...
function custom_pagination_base() {
global $wp_rewrite;
$wp_rewrite->pagination_base = 'p';
$wp_rewrite->flush_rules();
}
add_action( 'init', 'custom_pagination_base' );
...
0
votes
0answers
44 views
User driven content problems
I am trying to build a website that will allow users to post from the front end. I need to be able to have the user enter a title, a category, and tags. For the content of the post, I would ideally ...
0
votes
2answers
40 views
Code to auto expire posts after 30 days
I've tried the plugins that are available in the Wordpress plugins section but they seem to fail miserably. Initially, I used Auto Post Expire By User Role which worked for a time, but for some reason ...
0
votes
0answers
25 views
How do I link a button I created in theme customizer to a function?
I created a button in the theme customizer and I want to use it to execute a function? All I can find is using controls to add theme settings such as CSS and text. Although this button is to clear out ...
0
votes
0answers
31 views
Created custom control from theme customizer, where should I add code it will control?
I have created a custom control for the theme customizer which is a simple button and label. I am going to be using it as a theme reset button that will clear the theme mod settings to their original ...
1
vote
1answer
36 views
List of all theme customizer control types?
I have been looking through the theme customization API documentation and google to simply find out the names of the control types already built in to the theme customizer.
More specifically I am ...
0
votes
0answers
49 views
Press this! not working
I am trying to debug a Press this function on a site {Adult Contents}
This issue is, images on the page does not add up and does not show...
javascript code for press this button is
javascript:var ...
0
votes
1answer
38 views
How to add button to top of theme customizer?
I am trying to figure out how exactly I can add a button to the top of the theme customizer. The spot I am talking about is where the "close" and "save" buttons are. The ones that are above everything ...
0
votes
1answer
30 views
Exclude category
I want to exclude a category from showing in a function, but cannot figure out how to do it for my specific code as below. I want to make it so that any post that is in the "featured" category, does ...
0
votes
1answer
40 views
Mamp pro permalink issues. Pages keep reverting to index.php
So I pulled a site down to my local machine to do some work on it. Copied the files, find/replace on the database to update the url, added a host. Everything worked fine until I changed the permalink ...
1
vote
1answer
28 views
changing function wp_register
how can i change function in general-template.php without affecting this core file on this:
if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a ...
1
vote
1answer
44 views
qTranslate in functions.php
I have a function which redirects user to certain page:
wp_redirect('http://address/page');
Usually I would just use:
<?php _e("<!--:en-->english ...
0
votes
0answers
31 views
Wordpress adding in site URL to header links
A little information: I am developing a one page theme that uses posts as sections on the main page. I have created code that allows users to add a menu item in the post page from a meta box when they ...
0
votes
0answers
32 views
How to tell if string is null or empty in meta value? [closed]
I am trying to figure out how to find out if a string is null or empty in php. The place I am pulling the value from is a meta value that is stored from a meta box on the post page.
I want to check ...
-1
votes
0answers
19 views
How to build a search form explanation [closed]
Can somebody help me to build a advance search form like this...http://www.tvblog.ro/seriale-tv/
Wath keyword i shoud search on the web to find more explanation
A short model would be apreciate..
0
votes
1answer
33 views
How can I create a menu items from meta box based on users input
I have created a metabox that takes a name that the user can give as an additional name of their post. I am wondering how I can automatically create a menu item based on the name the user input into ...
1
vote
1answer
20 views
Trying to retrieve post meta
I have created a meta box that allows users to add an additional name/id to their post. From what I can tell it is adding the meta information correctly because when I edit a post that has a custom ...
-1
votes
0answers
15 views
Reset Button for Custom Plugin (reset to default settings with php not using settings api)
I have a custom plugin I am creating for wordpress in php. It's simple one with whitelabeling functions. I am trying to create a reset button. I know how to create the field. I think I can do it by ...
0
votes
1answer
63 views
Get post meta retrieving wrong value
I created a custom meta box with a textbox where the user can enter a custom value in as an additional identification tag. I thought I had it right but when I try to retrieve the value it is giving me ...
0
votes
1answer
80 views
Post to category based on email domain, for a post-by-email plugin
I have a wordpress plugin installed called Postie - it enables me to post to my wordpress by sending an email to a specific email address.
I need help with some coding in order to make it so it will ...
0
votes
0answers
33 views
How can I clear the theme mod settings?
Ideally I am looking to add a button to the theme customizer that allows the theme to reset to default settings, although that may be asking for too much in one question so I am wonder if anyone knows ...
0
votes
1answer
38 views
Custom <blockquote> HTML markup
In Wordpress, I would like to add a custom styling to the <blockquote> elements, replacing Wordpress' default usage by using a function (or however is easiest).
When using the WYSIWYG editor, ...
2
votes
2answers
55 views
How can I add dropdown widget/box to admin post page?
I am trying to figure out how to add a dropdown widget to the post page. The reason I ask is because I would like to be able to have a few different post classes that the user can select while making ...
-1
votes
0answers
39 views
Is it possible to dynamically add widget areas?
I am creating a very custom and unique theme that uses posts as sections for the front page. The posts all have a configured style to them, so I am wondering if it is possible to dynamically create ...
-1
votes
1answer
31 views
How can i hide content if not friend in Buddypress?
How can I hide some specific contents or div or other stuff depending on being friend or not in buddypress ??
I tried to use the bp_is_user_friends() function but it did not work !
4
votes
4answers
229 views
Import Wordpress XML File from Within Functions.php
I am developing a theme which has a different method of adding in content and so, the default install of Wordpress won't show any content because of this. I was wondering if it is possible to ...
0
votes
0answers
31 views
Cant get theme to change footer color through theme customizer
I am having an issue trying to configure the theme I am working on to allow the footer color to be changed. So far all of my other options work so I am geussing it is an issue with the way I am ...
0
votes
2answers
50 views
Theme not calling Jquery properly
I am developing a theme and I have called jquery along with other JS files from a theme-enqueue.php file. For some reason only the Jquery file that is hosted on googles servers is adding the theme URL ...
0
votes
2answers
72 views
Theme Customizer not loading JS for live preview
I am currently working on adding options to the theme customizer. For the last two hours I have been trying to get the live preview working and I am trying figure out why my theme isn't loading the ...
0
votes
1answer
36 views
Remove “Published On” inside wp-admin
How do I remove this? Preferaly would like to do an action hook inside functions.php to remove this. I don't want the editor to see/edit when they published the article.
Thank you for your help.
0
votes
0answers
35 views
How to make this scroll script work on just one post
I currently have a jQuery scroller on a website I am developing so that when a visitor hovers over an arrow the content scrolls up and down.
This is fine on single pages, but I now need to include ...
0
votes
0answers
29 views
Current path on page in functions.php
How can I get the current path of my page?
I know how to do it inside a template file, but I need it inside functions.php.
And it has to be before the send_headers hook, because I'll use this info to ...
2
votes
1answer
127 views
Generate Advanced Custom Fields box in custom admin menu page
I have created an custom admin menu page called FCC Youtube with add_menu_page function
which has some custom fields I manually generated via HTML and PHP:
code ( just the part how I created this ...
0
votes
1answer
66 views
How to use a variable as a function name?
I'm trying to loop a function that will let users create a few custom posts, but I have a problem with the function name. Here is an example:
How can I write this:
function ...
-1
votes
1answer
29 views
Image width issue in IE [closed]
For some reason images are being displayed as a thin line in IE 8 and earlier and i cannot work out why this could be. I'm using CSS to re-size the images for the homepage, the reason for me using CSS ...
0
votes
0answers
31 views
Create custom permalinks / rewrite
How can create a custom permalink in my functions file that would include a template page
when you go to a custom url: http://example.com/members/settings
I have a template page at ...
0
votes
1answer
33 views
wordpress get_post_meta give only first value
I made one custome post in that there is one custom field call _as_roomname.
I create total 5 custom post and I want to retrive all it's name but I get only first value.
function postlogo(){
global ...
