-1
votes
0answers
13 views

Games product for hire monthly [on hold]

I want to display games products on my wordpress site with hire and reserve button for monthly subscription. Can somebody told me the right plugin or code? Thanks in advance.
0
votes
2answers
22 views

How to arrange PHP files to allow for multiple types of pages

I am new to WordPress development (the most I've ever done on the web design/development side of things is creating basic HTML sites); so this may be an extremely simple question, but I am trying to ...
6
votes
4answers
256 views

Cleaning up WordPress to improve performance?

Looking over the current WordPress codebase it's clear that functions are over-used. My count is over 8,100 functions/methods are defined inside the WordPress codebase. That is terrible, and a ...
0
votes
1answer
37 views

Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?

I'm building a simple post order "plugin" through my theme's functions.php. The function updates the value of an option in options.php on submission of a form. So, for instance, when "1" is inputted ...
0
votes
1answer
18 views

How to Add Image to Wordpress RSS-Feed with no Plug-in?

I have searched for adding featuring image to rss feed with no plug-in for WordPress. I have found some examples and applied how it was instructed. But All I have got now is nothing. Still can't ...
0
votes
1answer
42 views

Create special button on WP Tiny MCE Posts Editor for Shortcodes

I am trying to create a special button on the Tiny MCE editor on the Post Editor of Wordpress. I want to create a button for my created shortcode tooltips. Check out my desired output: ...
0
votes
4answers
32 views

How to obtain the current website URL in my theme?

I am working on a custom theme and I have the following doubt about how to correctly insert the link to some section of my website into the theme. If you open this link you can understand what I need ...
1
vote
1answer
26 views

How to Reference/Echo Variable from Another PHP Function

I have successfully set up a PHP function for my blog posts to create a shortcode to automatically display/style an iFrame tag for a YouTube video, as well as pull in the duration and view count ...
0
votes
2answers
27 views

Differences when using the the_time and the_date functions

I have some doubts about how work the WordPress the_date() functions definied into general-template.php In a page I show the posts archive using this code snippet into a loop: <article ...
0
votes
1answer
31 views

Can I show also the post date using the wp_get_archives() function?

I am pretty new in WordPress theme development and I have some doubt about the wp_get_archives() function: http://codex.wordpress.org/Function_Reference/wp_get_archives In my website I have create ...
0
votes
0answers
13 views

Creating a filter to modify links ending in .pdf

I'm trying to create a filter that checks for links that are to PDFs, and append the href attribute with something like /form?file=[path to pdf]. For example, starting with: <a ...
0
votes
1answer
39 views

Remove echo from shortcode

I've just started playing with shortcodes and due to my lack of php knowledge I am unable to figure out how to make this shortcode work without using php echo. Can anyone help me revise my code? // ...
-1
votes
2answers
25 views

How to modify this function to exclude also the post belonging to a specific category?

I am very new in WordPress development and I have the folglowing problem. I use this function (declared into the functions.php file of my theme) to modify the main query in such a way that the post ...
5
votes
2answers
157 views

username_exists() function can't be access without logging in

I'm using the following function in functions.php to check if a username exists in the DB function check_username() { $username = $_POST['user']; if ( username_exists( $username ) ) { ...
0
votes
1answer
18 views

Unable to Call More than One Meta Box Output

I have a custom meta box with multiple text fields. I use this to call the information in the first box: <?php the_post(); echo get_post_meta( get_the_ID(), 'dbt_text', true ); ?> And this to ...
0
votes
2answers
28 views

Wordpress - registering sidebar and adding a button directly after .textwidget

I have registered a new widget area, code as below and want to add a button after the .textwidget, however cannot seem to do it properly. Adding it after the </li> results in the button not ...
0
votes
1answer
38 views

What exactly do this function declared into functions.php file of a WP theme?

someone can help me to understand what exactly do this function declared into the functions.php file of a theme? function exclude_featured_tag( $query ) { if ( $query->is_home() && ...
1
vote
1answer
51 views

How to add a class to the attachment images

When I'm in the Wordpress editor and I add an external image with the 'img' button, my html result wil be like this: <img src="http://example.com/image.jpg" alt="image" /> How can ...
1
vote
1answer
143 views

Edit tag cloud widget number

By default, the WordPress tag cloud widget has a set amount of 45 tags to display. This can be seen in the wp-includes/category-template.php file. By default, the WooCommerce plugin which I have ...
0
votes
0answers
17 views

Add a excerpt to a custom WYSIWYG

I have a secondary WYSIWG on my post and I am using it to display content under a thumbnail. I am trying to figure out how to limit the amount of words I can display with the code I am using to ...
0
votes
1answer
58 views

Creating wordpress user registration form

I am having a form page called Test Form with this form : <div id="container"> <form action="wp-content/themes/max-magazine/TestForm.php" method="post" name="myForm"> User <input ...
2
votes
2answers
66 views

Calculate percentage of post by category

Is it possible to calculate the percentage of posts in each given category? I'd like to make a bar chart to visualize the amout of posts in those categories. I thought what one needs would be the ...
0
votes
1answer
19 views

Get category id for a custom category and display it in a class

I am having trouble displaying my custom category ID to my li ID. The code I am using below is displaying the post ID of the post category instead of the custom category. What I am trying to do is ...
0
votes
1answer
42 views

Hide a div when a custom field is empty

I am having trouble hiding a div when the input of a custom field is empty. This is the code I am using but can not seem to get it to work. The field that displays the content is _cmb_fe_wysiwyg ...
1
vote
0answers
122 views

wp-comments-post.php file returns a blank page

When i post a reply to my blog, it's return a blank page to me. It seems that happens because of this code in wp-comments-post.php if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { header('Allow: ...
0
votes
0answers
23 views

Merge / Combine two php functions for Previous and Next Link with Thumbnail

I will wrap two merged php funtions in one div container - so i have only one php function and one link to the next post, regardless if someone clicks on the thumb or the text part. These are the two ...
0
votes
0answers
33 views

Add Class to Tag Cloud Links and Change Terminology

Is there a way to use functions.php to add a class name to all the tag cloud links? This topic does what I need, but it's not through the functions.php file. I was also hoping to change the tag cloud ...
-1
votes
1answer
42 views

How to display login form anywhere, when user isn't logged in, without redirecting?

I'm currently using Theme My Login, and I'm building a membership website where nothing is accessible to anyone, unless they're logged in. When a user, who isn't logged in, enters anywhere on the ...
0
votes
1answer
32 views

Execute only on a certain page

I"m trying to get the block of code below to load only when it's the contact page but it doesn't seem to wotk. Any ideas what the problem could be. Still pretty much new to PHP. if ...
0
votes
2answers
37 views

How to have Function of a plugin using global vars into a shortcode?

I am trying to convert this piece of code into a shortcode so it can be used inside my posts. Is it possible? I cant think of how to do it as I am beginner in wordpress and learning via books/youtube ...
1
vote
1answer
84 views

Recent post display using shortcode

I am trying to display recent post in static page home-content.php. I've added this code in function.php function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( 'orderby' ...
1
vote
1answer
182 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
3answers
40 views

Add a variable in functions.php and call it in single.php

I am new to PHP and am building a WordPress theme. I would like to add a variable in the functions.php and use it in single.php as an if statement. At present, my single.php has the following code - ...
8
votes
1answer
673 views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
0
votes
0answers
35 views

How to extract URLs from wordpress taxonomies

I am in quite a trouble. I need to extract all possible url from my wordpress blog be it of post, tag, category or anything else after domian-name.tld/*. I tried my hand on few available codes and ...
0
votes
1answer
43 views

Dynamically Generate Functions and Hooks

I'm trying to find if it's possible to dynamically generate functions and hooks. All functions do the same thing, and all hooks are essentially the same. Here's an example of a hook/function combo: ...
0
votes
1answer
57 views

How can I use wp_insert_comment to write a comment when a post is edited?

This would mean that when post A was edited by User1, a new comment would appear under post A that reads 'edited by User1', so that the post edit history can easily be seen. A link to the post ...
0
votes
1answer
50 views

Posting code inside the post instead of in the template file using shortcode

I am using two plugins one of which is Thumbs Rating which have have a shortcode like this for example in order to display the thumbs rating option: The code bellow is to be used in the templates ...
0
votes
1answer
133 views

How to access global variable $menu inside a class function

am puzzling why can't i access the global variable $menu inside a php class function class adminMenus { public function getWPdefaultmenus(){ global $menu; return $menu; } } using ...
2
votes
1answer
59 views

Enforcing password complexity

We need to enforce password complexity in a wordpress site, we used this article: http://www.webtipblog.com/force-password-complexity-requirements-wordpress/ We created the following in ...
0
votes
1answer
74 views

List sibling pages widget, exclude current page

I successfully created a widget that displays sibling pages to the current page I'm on in the sidebar. Only thing is, I'm not capable of excluding the current page - can someone please assist here? ...
0
votes
0answers
67 views

Ninja Forms - pull in some post related information

I am building a real estate website. There is a custom post type, called "Agents", that holds all the contact info, like the email address. I also have a custom post type called "Properties" where you ...
0
votes
2answers
81 views

Display custom meta box in my template file

Need help displaying my custom meta boxes on a template file. Following a tutorial Here's the code from my functions.php: function get_custom_field( $value ) { global $post; $custom_field = ...
0
votes
2answers
462 views

Function won't run onclick using Ajax

Ok, so my code is meant to be pulled from the function using the jquery code below, but it isn't pulling the code and I can't see why not. My pages code <script> var click_to_choose_user = ...
1
vote
1answer
62 views

php function to display commenter username or login

I want to display the commenters username or login name in a comment template. I know there is a function comment_author_link(), but this displays the "display name publicly as" name and not ...
0
votes
0answers
19 views

Count how many articles meet a search after add search field

I create a custom post field named "related_keywords". When i add a post, before save, i fill this field with a list of keywords. After that, I need that it search title posts that meets this search ...
0
votes
1answer
29 views

Displaying Event within two given time frames

I'm trying to display two different posts from my CPT named Events. One is going to be the next event the other is going to be previous event. I've got a metabox called 'Event date' The client at ...
0
votes
1answer
40 views

Functions are causing errors

I'm declaring a function on a plugin's PHP. The plugin loads code at the top of each post (Post Layout is the plugins name). Cannot redeclare vote_up() (previously declared in ...
0
votes
1answer
28 views

Insert wordpress tags below posts via functions.php

I'm in the process of building my own Wordpress theme from scratch and my knowledge of PHP is limited. What I'm trying to do is insert tags below each post. I can do this by inserting code into my ...
0
votes
0answers
75 views

Custom Menu echo own HTML

I've registered a custom menu and got all that set up, however the formatting of the HTML that the menu uses doesn't fit with the CSS/HTML menus I had previously and want to keep. Therefore I was ...