jgraup
  • Member for 6 years, 2 months
  • Last seen more than a month ago
Get content of publish box
0 votes

add_action( 'post_submitbox_misc_actions', 'show_current_filter' ); add_action( 'post_submitbox_start', 'show_current_filter' ); function show_current_filter() { $post = get_post(); print '&...

View answer
Changes in enqueued / registered stylesheet paths not updating—why?
0 votes

Make sure to wp_enqueue_style ('unique-style-name' ). add_action( 'wp_enqueue_scripts', 'register_plugin_styles' ); function register_plugin_styles() { wp_register_style( 'unique-style-name', ...

View answer
on click load images on the same page
Accepted answer
0 votes

So your site isn't setup to do any of this - and this isn't the solution to your problems but it'll do what you asked (click items and change images on the same page). You'll need to construct your ...

View answer
How can I inject options into an select tag inside the widget form?
Accepted answer
0 votes

The problem is in your jQuery statement. You pass the get_field_id but without # it's looking for a tag not and id. The second thing is even if that worked, you would be replacing the contents with ...

View answer
Display content based on an event
Accepted answer
0 votes

If you have to add our message before/after content then you're stuck with 'the_content' filter. It would be better if you put your message in a shortcode or hook so the theme customizations were more ...

View answer
Disable Linked Gallery Images If Mobile Browser
0 votes

Remove everything you don't need from the shortcode output. add_shortcode( 'gallery', 'modified_gallery_shortcode' ); function modified_gallery_shortcode($attr) { $output = gallery_shortcode($attr)...

View answer
Custom post type clean url
Accepted answer
0 votes

Generate WP can help you generate a clean CPT. If this doesn't work, try the site to make sure you didn't miss anything. // Register Custom Post Type function custom_post_type() { $labels = ...

View answer
Creating multiple page URL without creating the pages in WordPress
Accepted answer
0 votes

This is a simple outline so don't use this in production but it's a working example. Define your template and place it in templates/template-portfolio-template.php inside your theme. <?php /* * ...

View answer
How to center top Menu bar
Accepted answer
0 votes

You'll need to add this rule to your CSS somewhere. This positions the menu list 50% from the left, then translate the X 50% in the opposite direction. .menu > ul.sf-js-enabled { position: ...

View answer
Lazyload post thumbnails
0 votes

How to modify my code in order to get src directly with the_post_thumbnail and assign it as data-original? You can use str_replace and preg_match with get_the_post_thumbnail. $size = 'attachment-...

View answer
Turn revisions off in plugin instead of config.php?
Accepted answer
0 votes

Create a no-revs.php Set the contents to <?php defined('WP_POST_REVISIONS') or define ('WP_POST_REVISIONS', false); Place it in the Must Use Plugins Folder located at wp-content/mu-plugins. Be ...

View answer
Redirect - remove custom query string
0 votes

You can use add_rewrite_rule in WordPress to capture the query args or add_rewrite_endpoint. If you really just want to redirect based on certain rules then template_redirect can be a good place to ...

View answer
Replace taxonomy permalinks
0 votes

You might want to taker a look at add_rewrite_rule or add_rewrite_endpoint. Then to test, install a plugin called Monkeyman Rewrite Analyzer, it'll help you show you if your rules are conflicting. ...

View answer
Modify the Wordpress URL
0 votes

You might want to taker a look at add_rewrite_rule or add_rewrite_endpoint. Then to test, install a plugin called Monkeyman Rewrite Analyzer, it'll help you show you if your rules are conflicting.

View answer
Can WP Customizer work with single pages or posts?
0 votes

Eric Lewis just presented an idea that might make it possible. Check out Custom CSS per post in WordPress.

View answer
Keep the original ratio in a thumbnail image
0 votes

CSS Reference: background-size can stretch a background image proportionally using cover or contain. Check out this Demo. HTML <div class="square"></div> <div class="rec"></...

View answer
WordPress Theme Developments - Start from another theme
0 votes

It depends on the license in the theme so read carefully. _S and Roots.io are good starter themes. Otherwise, a good place to look is Google.

View answer
Display posts by tag on page
0 votes

There are already answers above on how to use loops so I won't add more about wp get recent posts or Taxonomy Parameters. But you might want to consider wrapping your code in a Widget which would ...

View answer
php - Plugin/theme relative PATH/URI
0 votes

function get_url_from_path ($path) { // clean paths $dir_path = str_replace( '\\', '/', $path ) ); // file or directory $site_dir = trailingslashit( str_replace( '\\', '/', ABSPATH ) ); //...

View answer
how to repeat taxonomy in different places on wordpress
Accepted answer
0 votes

register_taxonomy( 'taxonomy', array( 'post', 'coupons' ), $args ); https://generatewp.com/taxonomy/ can help you. // new code taxonomias function clrp_taxonomy_post(){ global $wpdb, $app_abbr; ...

View answer
301 Redirect Custom URL hierarchy to WordPress Posts
0 votes

One option is to Add URL Rewrite Rules. Create an API Endpoint in WordPress is a good tutorial as well as The Rewrite API: The Basics. Monkeyman Rewrite Analyzer is a great way to test what you ...

View answer
How to redirect all 404 in a Wordpress subdirectory to the index.php of subdirectory?
Accepted answer
0 votes

You can use a custom endpoint. Just be sure you flush the rewrite rules after it has been added/changed - not every page load! This will turn http://yoursite.com/dev/abc/asdfasdfsdf into http://...

View answer
Search only working on front page (index) , not working on other pages
Accepted answer
0 votes

Currently your form looks like: <form id="search-query"> <p class="in-english"><a href="http://localhost/hermodswp/?page_id=76">Information in English</a></p> &...

View answer
Using Wordpress public query variables
0 votes

Check the Template Hierarchy, Using Permalinks or install the Monkeyman Rewrite Analyzer plug-in to see how the URLs are getting redirected. Query Monitor can also help show you which conditionals are ...

View answer
Trying to understand order and frequency of action hooks firing
0 votes

The frequency and order of hooks can vary based on each theme or plugin you you have installed/activated, but obviously there is a typical order for core actions and filters. do_action( '...

View answer
1
9 10 11 12
13