Wrong urls generated, wordpress theme - php

I have problem after using all-in-one wp-migrate. I export page to other domain and then I have problem with include css and js files in personalization page. This files have wrong url, becouse there are "/wp-content/plugins":
For example(there are about 50 links like that, with css and js files):
There is:
/wp-content/plugins/wp-content/themes/classiadspro/includes/framework/ReduxCore/assets/css/redux-admin.css
Should be:
/wp-content/themes/classiadspro/includes/framework/ReduxCore/assets/css/redux-admin.css
I can't find where are generate this links. I think it's something wrong with some function file, but I can't find it. Please help where I can change that.

You should regenerate permalinks after migration using All-in-One WP Migration. On the left side menu, select Settings > Permalinks, then click Save Changes. It’s unnecessary to edit any of the default permalink structure information. Repeat saving once again (twice at all) and now it should be ok.

Related

Which .php File Controls WordPress Media Library?

I'm trying to modify the WordPress Media Library very slightly.
Currently when viewing it, if I click on the file name, it will being up the edit page for that piece of media in the current tab. However, I would like it to be that when I click the file name, the edit page will open in a new tab.
I assumed this would be as easy as adding target="_blank" to the html link.
But I cannot find the .php file in my WordPress install that controls the Media Library, could anyone tell me which file it is please?
Many thanks,
Jake
The file you're looking for is located here: wp-admin/includes/class-wp-media-list-table.php.
However I don't recommend modifying that file. You want to avoid making changes to core files if at all possible. If you change that file, your modifications will be lost if you upgrade WordPress.
Instead, I would use javascript to add the title="_blank" attribute to those links. You'll need to enqueue a js file and then write a simple script to update the links:
(function($) {
$('.wp-list-table.media .media-icon a, .wp-list-table.media .column-title a')
.attr('target', '_blank');
}(jQuery));
This is a less than perfect way to accomplish what you want, but I think it is preferable to modifying the core.

editing WordPress Theme with content embedded in PHP script

I am trying to redo my homepage of my website which is a WordPress website. The homepage is hardcoded in PHP, and I would like to figure out how to
Replace some of the image files
Edit the text under those image files
I have redesigned the (4) image files I want to update the site with, but I don't know where in the script to paste the name of those files. There are tones of file slike index.php, theme,php, and I would figure that under these I would see "front_forecast.png" somewhere where I could erase that and type in the image file name I want there instead, but I haven't had success.
It's going to be a bit hard to help you without seeing some code, your current site, or even knowing what your theme is. As gwillie said though, it might be best to go back to basics first.
From a template pov, I have always found this diagram helpful in understanding how WordPress uses its templates to output content (source: http://codex.wordpress.org/Template_Hierarchy#Visual_Overview):

Wordpress generating wrong URLs

I am a completely newbie in wordpress. At this moment, my blog URL is blog.mysite.com, and in the past it was www.mysite.com/blog.
The URLs and links are ok in the blog, because I changed the base URL in wp-config file. However, the images are still using the old route.
This is the URL of my pictures:
blog.mysite.com/wp-content/themes/canvas/functions/thumb.php?src=http://mysite.com/blog/wp-content/uploads/2012/04/bname-268x300.jpg&w=150&h=150&zc=1&q=90
As yoy can see, it is using TinThumb plugin, but the URL that it is using is the old one.
Can anyone help me to fix it?
Wordpress main drawbacks is it saves complete image url in db.
So if you migrating your site you have to search & replace url in your sql file & need to dump it again.
I suggest you to do it manually and follow the steps mention here.
Also there is plugin available to do the same named Search and Replace.
add the two lines in wp-config
define('WP_SITEURL', 'http://newsiteaddress.com/');
define('WP_HOME', 'http://newsiteaddress.com/');
please note that some plugins that use the file system like ssome caches may have to be reconfigured or the cache may be reconfigured
You need to dump database to file and replace all strings 'mysite.com/blog' to 'blog.mysite.com', and after overwrite database by fixed dump.
Sorry for my bad english.

Joomla add/edit article and section screens blank

I'm using Joomla v1.5.26 and for whatever reason when I navigate to MYSITE.com/administrator/index.php?option=com_content&task=add or if I try to edit any already existing articles (or sections) I get a screen with an empty body tag.
The other pages in the administrator part seem to be working.
It seems to be the same (or very similar) problem as this: http://www.justanswer.com/computer-programming/32fo1-when-hit-new-button-article-manager-joomla.html but this is the only instance I could find of the problem, and it isn't resolved at the end of the article.
Thank you for your help.
My suggestion:
1- Try to disable the editor you are using (Set it to no editor on global settings or on the user you are trying to edit with)
2- Try to reupload components/com_content from Joomla 1.5.26 source to your website and overwrite the existing file. There might be something missing.

Why is my specific page tpl.php not being used?

I can't seem to use a unique page--xxxxxxx.tpl.php for a specific page.
I created a "page" content, filled it in, and gave it a path alias. Let's say: "mypage/mycontent". Then I created a page--mypage--mycontent.tpl.php file in my theme's root. Instead of using it, my page.tpl.php is being used.
I was under the impression that Drupal 7 automatically searches for template suggestions using the format of page--path.tpl.php, is this incorrect? Do I need to include specific code in my template.php file first? I did try clearing the theme cache, btw and that didn't make a difference.
If it's just a node, try to rename your template file to page--node--NID.tpl.php and then flush the cache, also don't forget to replace NID with the nid of this node to be something like page--node--11.tpl.php :)
Hope this works... Muhammad
Your impression is correct, and page--mypage--mycontent.tpl.php (i.e. the one you've already tried) is the correct file name to use to override the page.tpl.php for a page with that specific path "mypage/mycontent". You don't need to change anything else.
However, in addition to clearing Drupal's cache, you also need to clear the browser's cache. In most browsers, including Firefox and MSIE, you do this by holding down the SHIFT key while reloading the page. Without clearing the browser's cache, you will not be able to view your template suggestion in the browser.

Categories