Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics

bradklosterman on "APIs for JS-templated custom Sections and Panels"

Wordpress advises against using php to build panels for the theme customizer. How do I implement custom panels and dynamic sections using the JS API?

View Article



Taro on "Search result based on menu category"

Hi All, i'm looking for two pieces of code that can help me with the following: I got posts and pages with a custom menu. These posts/pages got a custom template activated. The templates contains the...

View Article

herculesnetwork on "how to add values of a variable with string, within...

add values of a variable with string, within another variable that also contains string, but insert in the middle of the text, eg I have a text with 100 words, and I have another variable also with a...

View Article

nkpryor on "Classified Ads Website - Need code that'll prevent posts with...

So I use the "PreimumPress" Classifieds Blue child theme, and the code I have below will check if there is a “bad word” entered into the Keywords input/field and alerts the user about it once they...

View Article

theamountof on "Can't get jquery to work"

I am relatively new to getting using jquery, but a client wanted something where when you hover over a child div, the parent divs background would change. A rudimentary version of what I came up with...

View Article


pawelkmpt on "Custom query_var causes displaying posts archive on front page"

I'm having an issue which is caused by custom query var named date I've added using query_vars hook. When date parameter is present in the front page URL (https://example.com/?date=23.08.2016),...

View Article

wpbetheme789 on "How to use shortcode where URL is expected"

Hello, for my design it is more complaisant to use shortcodes instead of url because the shortcode provides some additional formatting. Example: When you like to have a shortcode resolved by a main...

View Article

carlos on "deny access to url for role"

Hi, I need some help with this bit of code ... the thing is I am trying to deny access to a role name for a specific part of the admin area. /* * If user is not a SuperAdmin, when they try to access...

View Article


VVTinho on "Wordpress jQuery shortcodes"

Hi! I have a jquery code with shortcodes from the plugin draw attention, and im struggling to try to hide some divs shortcodes, before I use jQuery show. <script...

View Article


digitalnord on "Scrolling an image On Top Of Another On Mouse Over"

Hey, here is one way to do that: HTML <div class="moveimg"> <img src="http://placehold.it/350x150/ff0"> <div class="moveimg-hover"><img...

View Article

sjoerd89 on "Add a product count on top of page"

Hi there, i would like to add a product count on top of my shop page (woocommerce) to show how much products are left when filtering. I added the following to my functions.php // [product_count]...

View Article

monikapoldma on "How to display pages first with search"

I need my WordPress search functionality to display all the pages with the inserted keyword first, then posts(starting from the latest which was inserted) and then everything else that comes up with...

View Article

Victor Noyes on "Show mobile admin hamburger menu icon?"

Instead of having the main admin sidebar menu, I would like to just have the mobile hamburger icon in the admin bar at all times. I have played around with the css and the best I could get was just the...

View Article


johnwp413 on "How to make a jQuery script the last action"

I am trying not to repeat a post I made in the Plugins forum. This is just a more general question. I want to reverse or negate an action for a plugin only on certain pages. But I need to make sure the...

View Article

paulacschuler on "Make menu link to login page at wp-login.php"

I moved a company's site to another host. Previous developer and office manager are out of the picture. Site has three dozen plugins. Login link in the menu bar disappeared. Plugins are Theme-My-Login...

View Article


ashiquzzaman on "Default Layouts not showing on frontend on theme activation"

I have set the default layout, so that on theme activation the default layouts shows on front-end without having to save anything in the database. But the problem is the default layouts doesn't show on...

View Article

msthunder1 on "Shortcodes in ajax - again"

Hi, I've seen this issue being addressed over and over again, but i haven't come across a 100% working solution for everyone that is trying to create custom AJAX calls on content that contains...

View Article


kostek00 on "Hide certain tags from users"

For some time I'm trying to write a plugin for my site that hides certain tags from normal users but staying visible to administrators. I also searched for answers and while finding some they don't...

View Article

isaacbenh on "Should I create a DB table for this?"

I have a "company" post type. I need to show how much money company raised by rounds. It will be something like: Round 1 - $1,000,000 Date - 08/10/2016 Round 2 - $1,500,000 Date - 06/11/2016 I might...

View Article

geez1 on "Local storage message on some Safari devices"

I am seeing an error message appearing on some Safari devices (but not others). I have seen this happen on iphone 4 & 5 but not 6 and it also happens on ipad air. I think it is because when...

View Article

justinwhall on "Get number of new posts in each category since last visit"

I can think of a number of ways to go about doing this. I'm looking for the most efficient way. Menu looks like this: catArchive1 [num_new_posts] catArchive2 [num_new_posts] catArchive3 [num_new_posts]...

View Article


haciawo on "Image resize cropping issue"

Greatings folks! I have an issue - in my website i have sidebar recent post/related posts witch is using featured images as thumbnail. My problem is that: my image is 600x100 and wordpress system...

View Article


jklyn on "How to show multiple CPT by category in custom archive page?"

Can anyone please tell me how can I show multiple CPT by category in archive page. Lets say I have CPT “product” and another CPT “news”. I managed to get the CPT product to list on my archive page but...

View Article

schemaishard on "simillar article images display wrong meta data"

I am currently installing schema code into the image tags and I am running into some trouble. I have got to a point where I can get the width and height to display correctly for the main header image,...

View Article

Taro on "Re: Search result based on menu category"

Dear bcworkz, The following "wp_redirect" i found in my function.php <?php add_action(‘template_redirect’, ‘bwp_template_redirect’); function bwp_template_redirect() { if (is_author()) {...

View Article


mynde on "JS in main page"

Hello community im really stuck with this thing , maby you can help me out. I'm trying to add a small piece of java script from this project - http://introjs.com/ to main main page that is running on...

View Article

isaacbenh on "Are my $wpdb queries efficient?"

I have a company post type and a rounds table. The rounds table contains data about how much money each company raised and in how many rounds. The user can basically add and remove how many rounds that...

View Article

cfurrow on "sidebar only on certain archive pages"

Hello! I'm trying to add a sidebar to my archive pages, but only the archive pages for my custom post type 'teachings', and for the custom taxonomy pages that are correlated with that post type. I want...

View Article

nosilver4u on "antispambot no longer working in a shortcode"

Or are the browsers just too clever now, and they don't show the obfuscated code? Here's what I've got: function display_my_email() { return '<strong>' . antispambot( 'support@example.com' ) ....

View Article



Guido on "Custom upload folder"

Hi, I want to upload files to an additional upload folder. All files with 'canada' in their name. I use upload_dir to create a custom upload folder: function custom_upload_dir( $custom_dir ) { $dir =...

View Article




Latest Images