Search Results for 'child theme'

Results from the Forum
simchris
tagDiv Member

Heh. Yeah, now you know why I don’t work with child themes any more!

I tested the font on my own site our of curiosity without using child theme and it works perfectly fine in IE. So, fyi, it’s not “the font” at issue with IE, but the child theme messing with the remote loading of the font.

So, luckily you got that sorted! 🙂

SuzanneL
tagDiv Member

Hi Guys,

Just wanted to let you know that I was able to fix it. What I had to do was completely change all font-family code on the main themes style sheet, make all the child theme settings in the theme panel the same font, and do custom css in the child theme for h1 – h6.

That’s a lot of time and work just so things so correctly in IE.

Thanks,

Suzanne

  • This reply was modified 11 years by SuzanneL.
TheMediumUTM
tagDiv Member

I seem to remember having little luck with that. I think the way I ended up doing it was copying, renaming, and editing the functions in my child theme functions.php, then removing the action or filter of the parent function and adding the action or filter of my own.

Lucian
tagDiv Staff

Hi,

Thanks Christopher!

@SuzanneL

If you use the child theme you need to add the css here, like this: http://screencast.com/t/NBAIpyzRRA
Try to activate the main theme, then you will find the style.css in the root of the theme: http://screencast.com/t/5vUswQG54edY

Thanks

popdelart
Participant
#0

Hi,
Is the td_module.php inside wp_booster editable using the child theme?
I need to make some changes but, cant seem to make it work.

simchris
tagDiv Member

Ah, you’re using a child theme. I don’t use child themes due to these kinds of issues, because the css is basically a “redirect” to the main CSS, and Google ‘frowns” on CSS redirects even though WordPress loves them.

So, that might or might not be the issue. The style.css I was referring to is the “main” one in the main theme, not the child theme.

I no longer use child themes, to achieve better pagespeed, so I guess I’m out on any help for this one 🙂

SuzanneL
tagDiv Member

Okay, I’m probably missing something pretty simple here, when I try to access the style sheet or open it this is what I get:

/*
Theme Name: Newspaper Child theme
Theme URI: http://themeforest.net/user/tagDiv/portfolio
Description: Child theme made by tagDiv
Author: tagDiv
Author URI: http://themeforest.net/user/tagDiv/portfolio
Template: Newspaper
Version: 1
*/

@import url(“../Newspaper/style.css”);

/* —————————————————————————-
Your custom style…. here 🙂
*/

How do I access the complete style sheet? That would solve all of this. : – )

Thanks,

Suzanne

tenocation
tagDiv Member

Thank Lucian. I will try and update here if it’s possible.

Lucian
tagDiv Staff

Hi,

You can try to see if you can change it via child theme but I doubt it, the files that can be modified via child theme are those mentioned in the child theme documentation: https://forum.tagdiv.com/child-theme-documentation/

Thanks

Lucian
tagDiv Staff

hi,

1. Set your page like this: http://screencast.com/t/mFS78jdGSR and add your sidebar using the template settings, you will get this result: http://screencast.com/t/hQjbwmW1LNQT

2. Regarding this: http://screencast.com/t/mmbsde2GF the white space is there by default: http://screencast.com/t/jrfCYsVwbQI
You can chose to hide the title if you don’t want it, like this: http://screencast.com/t/eYzG6v7g

3. You can use the child theme: https://forum.tagdiv.com/child-theme-documentation/ or you can edit the file you want to modify then copy your modified version of the file into a new file and save it, then follow the update log each time the theme updates and check if those files you have modified have changed, if they haven’t changed you can replace them with your own modified files else you will have to make the changes to the new files.

Thanks

  • This reply was modified 11 years by Lucian.
TheMediumUTM
tagDiv Member

Hi Ecofame,

Quick clarifications:

1. It shouldn’t make a difference between the child and parent themes.

2. A CDN is a content delivery network, used to serve your site to people faster. Don’t worry — if you don’t know what it is, you’re probably not using one 😉

3. The caching plugin is actually what would have prevented you from seeing the changes, and then you would have had to clear its cache. You can deactivate it for now (although they’re often helpful, it’s not the problem or the solution at the moment).

Now, on to business.

Can you explain which whitespace you want to remove on your site? There are a lot of options. The CSS that Lucian and I gave you got rid of white space under each row of articles, because that’s what the first people in this thread were asking for, and I can see the difference on your site now.

But I assume there’s more that you want to remove. Maybe you can point out the whitespaces you want to remove on this screenshot of your site?

http://www.screencast.com/t/psO73z7g

Ecofame
tagDiv Member

Hi TheMediumUTM,

I am using the childtheme. Would it be there any different if I was using the mothertheme?
I don’t know what CDN is and I just installed cache plugin. Could you pleas guide me how to refresh the prowser using cache plugin?

Regards
Ecofame

tenocation
Participant
#0

Can i put widgets folder and td_login_widget.php file in child theme?

TheMediumUTM
tagDiv Member

It looks like you’ve done it almost exactly right. But I have these notes:

1. I made a mistake when I said to use the_field — change all instances to get_field in the code.

2. If you can’t activate a child theme, your code modifications won’t survive a theme update anyway and you’ll have to redo it each time you update. 🙁 Still, it should work. And it’s fine if you use that block of code instead of the functions.php way I quoted.

3. Once you have that code in your template files, you don’t need to do anything from the post editing page besides enter those custom fields.

4. If you’re not seeing anything show up when you view the post, you might be putting your code in the wrong single post template file. There are seven of those in this theme: loop-single.php, loop-single-1.php, single_template_2.php, single_template_3.php, single_template_4.php, and single_template_5.php. You could put the above code in whichever template file you’ve picked in Theme Panel -> Post Settings, or you could put it in every template file.

5. Just to make sure, where are you putting the code in the template file? (Which lines come right before and after it?)

TheMediumUTM
tagDiv Member

For problem 2, if you want, you can hack it out of the single template files. What you would do is first make sure you have a child theme set up and activated. (You could do this in the Newspaper them itself, but it would not survive a theme update. Then again, hopefully an update will allow you to disable categories via the panel.)

Then, for each of the following files in the Newspaper theme folder:

loop-single.php, loop-single-1.php, single_template_2.php, single_template_3.php, single_template_4.php, single_template_5.php

Copy and paste them into your child theme folder.

In each one, find the line:

<?php echo $td_mod_single->get_category();?>

and comment it out like this:

<?php // echo $td_mod_single->get_category();?>

Upload the files to your site. Your template files will no longer add the category element to your posts.

Happy editing and hope someone else stops by to help with the other problems!

scorpio85
tagDiv Member

Thanks Chris And The Medium

Both of you guys were right…

The problem was that I forgot to place the “header style1.php” file in the “parts” folder inside of the child theme

Everything works perfectly fine now thanks!

scorpio85
tagDiv Member

I tried doing option 1 before and it completely broke my whole site to the point that I had to recreate all of my posts, and images…it was a nightmare.

I tried the second option before. well, I erased the entire line. it didnt work.

Then i tried your suggestion of replacing the php line, but it failed to work and the logo still links to pitchforkmarketing.com

Im working of of the child theme file “header-style-1.php”

I’m certain that is the correct file. Any other options

btw, thanks TheMediumUTM

tenocation
tagDiv Member

Thanks for reply, I previously activated child theme but synthesis allows me to activate one theme at a movement and therefore whenever i activate it, it throws an error in the dashboard.

I first created a number of fields like here under one group as you can see here.

Then i am inserted the code you provided in loop-single.php

// Set up your row, column, and tabs element
$to_echo = '[vc_row][vc_column width="1/1"][vc_tabs]';

// Simplest possible example of getting ACF data, sub in yours
$data_1 = the_field('2g_network');
$data_2 = the_field('3g_network');

// Repeat these lines for each tab, making sure each tab has a unique id
$to_echo .= '[vc_tab title="The first tab" tab_id="tab_1"];
$to_echo .= $data_1;
$to_echo .= '[/vc_tab]';

$to_echo .= '[vc_tab title="The second tab" tab_id="tab_2"];
$to_echo .= $data_2;
$to_echo .= '[/vc_tab]';

// (You could wrap each block in an if to skip a tab if the data is empty)

// When you have all your tabs, close the elements
$to_echo .= '[/vc_tabs][/vc_column][/vc_row]';

// We have to filter the whole string to make WP interpret the shortcodes
$to_echo = wpb_js_remove_wpautop($to_echo);

// Do whatever
echo $to_echo;

But now i don’t know what to do here on this screenshot.

I entered the custom fields on the post page but it’s not showing up.

And yes, i have FTP access of my site. Infact, i don’t have access to edit themes within dashboard due to my hosting strict security policy. That’s why, i was not able to take screenshot of code itself on the edit page of single loop.

Thanks again for support.

doran
tagDiv Member

Thank you Lucian,

I appreciate you support.

Kind Regards

TheMediumUTM
tagDiv Member

Try changing the site url in WordPress’s settings (“General” tab) to pitchforkmarketing.com/blog. This represents where the WP site is.

The target of that link is generated in whichever header file is associated with the style you’ve chosen in the theme panel (and located in wp-content/themes/Newspaper/parts/). The relevant code is <?php echo home_url(); ?>. If the first step fails to work, or for some reason you don’t want to change youur site url, you could create a child theme and change the line to <?php echo home_url() . '/blog'; ?>.

TheMediumUTM
tagDiv Member

No problem. I’d love to help but prefer not to share contact info for the time being… Can you describe the steps you’re taking? Do you have a child theme set up and activated? Do you have FTP access to your site?

TheMediumUTM
tagDiv Member

Note! I should have used get_field, not the_field, up there. the_field echoes it right away but get_field gives you the data so you can put it in a tab.

One last thing is that if you’re going to use this in all your templates, you should probably just go to your child theme’s functions.php and turn the code into a function. You have to pass the post ID to that function as well. It should look like this:


function my_custom_field_tabs($post_id) {
  // all the code I posted above, indented
 ...
}

Except that instead of echo $to_echo; you’ll have return $to_echo;, and instead of $data_1 = get_field('field_1');, you'll have$data_1 = get_field(‘field_1’, $post_id);`.

Then, wherever you want to insert the tabs in a template, you would just use this one line:


<?php echo my_custom_field_tabs($post->ID); ?>
TheMediumUTM
tagDiv Member

You’re welcome! Where you put it depends where you want it in the post. You could have it between header and content, after content, after footer, after comments… etc.

If you open up loop-single.php or loop-single-1.php you will easily see the blocks where the header, content, and footer parts are prepared and echoed. For loop-single-2 through loop-single-5 it’s a little more complicated because the header block is located in single_template_2.php through single_template_5.php instead.

Just throw this code between a <?php tag and a ?> tag into one of those handily titled blocks.

And if you’re not using one already, don’t forget that these files should be modified in a child theme so they will survive theme updates.

The tab ID is okay as it is. As far as I can tell, it just needs to be unique and have no spaces.

P.S. If you know some CSS you could also add classes to your $to_echo string around your content and style that in the Custom CSS section of the theme panel. Wrapping the tabs is probably going to mess with them a little, but the content inside the tabs can be styled freely.

Lucian
tagDiv Staff

Hi,

Unfortunately it doesn’t because you can’t override those files via child theme. However you can do it using the main theme, make a copy of those files and replace them after an update.

Thanks

Lucian
tagDiv Staff

Hi,

1. Looks fine to me, this is “Ubuntu” on your page: http://screencast.com/t/tyYTqVEex and look’s to me like it dose on google fonts page: http://screencast.com/t/BsD9l6Xvi the point is that the fonts do change, please use the one that looks fine, from I have noticed the one that you are using now looks fine and supports the turkish characters.

2. This usually happens because of the speed booster plugin which move the css and js at the bottom of the page structure so that the page will load faster, this is why the theme blue color appears first then changes, because of the cascading property of css, the same regarding fonts.
What you can do is to use the method I suggested before and change the color and the fonts directly into the css style-sheet which will make your colors and your fonts to load first and stay that way. You could also deactivate the plugin if you don’t need it.

3. Regarding the theme panel’s custom typography I have made some tests with it to check if it’s working well and noticed that works just fine for widgets title:
This is what I have chosen: http://screencast.com/t/M9V7tFarfe
This is the result: http://screencast.com/t/suckL0bGpf
This only changes the widgets title, not the block title, for that you will need custom css.
For the menu items also works: http://screencast.com/t/Qr3UD6bMeo

Try to change it yourself like this, I’m not sure why it dose not work for you, it may be due to some plugins or the speed booster plugin which overwrites the settings from theme panel, try this without any plugin activated and check if works.
Like I said before the best solution would be to replace the fonts and color as you like and need into the style.css file, this will solve both issues if you want to use the speed booster plugin or try to see if this works without the plugin.

Sorry for the delay, hope this helps!
Thanks

Viewing 25 results - 12,526 through 12,550 (of 12,866 total)