Tag Info

New answers tagged

0

As you want to change (use different) URL for featured image only, you can use pre_option_upload_url_path hook. // Setting the uploads directory URL function wpse_change_featured_img_url() { return 'http://www.example.com/media/uploads'; } add_filter( 'pre_option_upload_url_path', 'wpse_change_featured_img_url' ); This hook will not change URLs ...


0

For all my answers I'm assuming you both have the legal rights to use those images and are aware of any implications of duplicate content (SEO etc). That being said there are definitely ways. At what point would you like to scrape images? Regularly? If so look into WP_Cron and automate it. If you just want to scrape the image once you generate a new post, ...


1

It depends on your image and stylesheet location. But this is the syntax: .theme-image { background-image: url('../images/header-img.jpg'); } The above code is for the structure wp-content - themes - your-theme - images - header-img.jpg - css - style.css You are making the browser come one directory before and search for images ...


0

It is possible as referenced here but you are talking about a great deal of customization in the Gravity forms plugin and like you said you are not a programmer yourself, so you better open a support ticket in their forums and they might be able to help. Also look at this code that can help you if you decide to do it yourself $upload_dir = ...


0

That's pretty simple, just use your website home url :) After that, just fire an action when the page is loaded via POST HTTP method and hook with a callback. add_action( 'wp_loaded', function() { if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) { // fire the custom action do_action('onchangeapi', new PostListener($_POST)); } } ); And now ...


0

Hope You have imported it correctly. But I'll suggest you to try sql dump. Export sql dump from your database and import it in your local system. It will work correctly.


1

Good news for WordPress versions 4.2+ Since version 4.2 the handy get_avatar_url() function, introduced as a feature request in ticket #21195 few years ago, now ships with the core: /** * Retrieve the avatar URL. * * @since 4.2.0 * * @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, * ...


0

There isn't much "dynamic" about actually creating folder tree and index files in it. What you have right now is completely tangential to your WordPress installation. In a nutshell, if you need to integrate this with WordPress, you have two approaches: Load WordPress core in your code. This can be done with including wp-load.php and some fine–tuning, but ...


0

My issue is resolved, i am posting this as an answer so that someone else can benefit out of it. My issue was, siteurl and homeurl were not updated, so i have placed define('RELOCATE',true); in my wp-config.php file. And again tried to access the website , it gone to the correct url but all the css was gone. Then i headed over to wp-admin and it also came ...


1

After checking phpinfo(), mod_rewrite wasn't enabled so I enabled it: http://linuxcommando.blogspot.fr/2014/03/how-to-enable-modrewrite-for-apache-web.html and it worked !


0

I had to modify the permalink configuration which was set on www.mydomain.com/index.php/%.... Just deleted the index/php and it worked


0

I figured out the problem: the SEO plugin by Yoast is breaking the images as described, doing (probably) a URL rewrite at the time the media is upload. I resolved temporarily bye disabling the plugin. I will then find a better solution analyzing why the plugin is behaving in such a way and update my answer.


0

Although the accepted answer looks to be a good one, just changing WP_SITEURL/WP_HOME doesn't work in my case because there always ends up being lots of absolute links in the text content on pages (i.e. images or links added through the WYSIWYG editor). In other words, I pretty much have to use the same domain if I want the site to work properly. So in case ...


0

My advice is to make the whole site https. Either add https to the settings -> wordpress address & settings -> site address or remove https if it appears in either of those inputs. For securing admin login panel only: easy method but doesn't show secure icon. right result but more steps to consider method.


1

And the strange part: both codes echo the same string for $url!!! No, they don't. Look at the page source. esc_url() is encoding the & control character. You can't do that and expect the HTTP request to work correctly. Use esc_url_raw() instead. Note the description in the Codex concerning that function: The esc_url_raw() function is similar to ...


4

You can use wp-config.php to change the site url depending on where the site is accesed from, using $_SERVER['REMOTE_ADDR']. Mine has something like this: if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') { // accesing site from my local server define('WP_SITEURL', 'http://localhost/mysite/'); define('WP_HOME', ...


0

Most likely you at some point uploaded something called "about us". (You can see it if you go to site/about-us) In this case you apparently have to delete and re-upload the file, after setting page permalink to what you want. See https://core.trac.wordpress.org/ticket/32048, and https://core.trac.wordpress.org/ticket/24612


0

Just of the top of my head, something along this way might work: function wpse178647_rewrite() { add_rewrite_rule( '^([^/]+)/([^/]+)/?$', '' 'index.php?category_name=$matches[1]&pagename=$matches[2]', 'top' ); } add_action( 'init', 'wpse178647_rewrite' ); Completely and utterly untested.


1

In WordPress, the footer scripts are enqueued using wp_enqueue_scripts into wp_footer(). So it is hard for you to find the direct scripts link in footer.php. To change the path you can go to PHPmyAdmin and edit the siteurl and home fields in options table of your database. You can include jQuery from CDN using the following code: // Register Script ...


0

adding the parameter as exception directly inside webmaster tools is an option for you. However you have canonical on the right place, so it's not something you should be bothered



Top 50 recent answers are included