Search Results for 'child theme'

Results from the Forum
curocmi
Participant
#0

Hi all,

Thought I’d share a great tool with you all. I found this YouTube wordpress plugin from CodeCanyon that I use as a bulk youtube video importer.

It is at: http://codecanyon.net/item/youtube-wordpress-plugin-video-import/4429742

To use it properly, you will need to add two functions, one in the parent theme and one in any child theme that you are using. I used the code the plugin developers provided in the documentation and modified it for the Newspaper theme to make it compatible with the plugin.
Once done, the import feature save a tremendous amount of time going to YouTube and searching for stuff to put into the site. With the function additions, the YouTube videos will be imported directly as your posts.

The Code:
—-Place in child theme—-

// YouTube plugin functionality
/**
 * Add theme compatibility 
 * @param array $themes - array of default compatible themes
 */
function newspaper_child_theme_compat( $themes ){
	
	$themes['newspaper child theme'] = array(
		'post_type' => 'post',
		'taxonomy' 	=> false,
		'post_meta' => array(
			'embed' => 'cb_video_embed_code_post'
		),
		'post_format'	=> 'video',
		'theme_name' 	=> 'Newspaper child theme'
	);
	
	return $themes;
}
add_filter('cbc_youtube_theme_support', 'newspaper_child_theme_compat');

—Place in Parent Theme—-

/**
 * Add theme compatibility 
 * @param array $themes - array of default compatible themes
 */
function newspaper_theme_compat( $themes ){
	
	$themes['newspaper'] = array(
		'post_type' => 'post',
		'taxonomy' 	=> false,
		'post_meta' => array(
			'embed' => 'tie_embed_code'
		),
		'post_format'	=> 'video',
		'theme_name' 	=> 'Newspaper'
	);
	
	return $themes;
}
add_filter('cbc_youtube_theme_support', 'newspaper_theme_compat');
/**
 * On bulk post import, set up all extra fields needed by the theme to flag post as video
 * @param int $post_id - ID of newly created post
 * @param array $video - array of video data returned by YouTube
 * @param false/array $theme_import - theme import configuration
 */
function newspaper_post_fields( $post_id, $video, $theme_import ){
	// check if setting is to import as theme post
	if( !$theme_import ){
		return;
	}
	
	$postarray["td_video"] ="http://youtu.be/".$video['video_id'];
	update_post_meta($post_id, 'td_post_video', $postarray );

}
add_action('cbc_post_insert', 'newspaper_post_fields', 10, 3);

——– End Of Code ————

Hope you guys find this useful.

sunkast
tagDiv Member

First template: http://pastebin.com/6tB2Tk0h
Second template: http://pastebin.com/2nP9QCzn
Combined templates: http://pastebin.com/586fMZHM

Please also note that I am using shortcodes in the templates that are used by plugins I have installed. I also set my posts to the Video format. And I have modified the child theme CSS to add a top margin to P tags using this CSS code:

.format-video p {margin-top: 21px !important; padding-top:0 !important;}

From what I can see, when the second template gets adding, it removes the blank lines surrounding the text, and WordPress doesn’t format it automatically as a paragraph because of it.

  • This reply was modified 12 years by sunkast.
simchris
tagDiv Member

@raugustox
Hi ! Nope I don’t work here.
I just kind of “adopted” this theme last year since we had been working on building something in house very much like this and then when I found this, they were further along, so decided to just use this since it had the micro data, bootstrap elements, above average knowledge of pagespeed (MOST WP theme companies have never used PageSpeed Insights… which as of this year is pretty pathetic, if you ask me).

Since I was doing a lot of work on our two test sites, I was popping in here everyday with version 2 and just started sharing info since I’ve been using WP since 2005ish, and have suffered most of the pains that the newbies/scrubs are running into. 🙂

My apologies if I ever offend anybody by stating the obvious sometimes, but I know I’ve gotten a LOT of help on forums over the years, so it’s kind of my way to pay back, pay forward, keep theme going, etc.

I don’t work for tagDiv and have no financial involvement or other relationship.

Just a big sappy fan ! 🙂

simchris
tagDiv Member

Wordpress org has wonderful help on how basic wordpress functions work, see:
https://codex.wordpress.org/Child_Themes

simchris
tagDiv Member

zokolus
look at the standard sizes found in the theme docs, here:
https://forum.tagdiv.com/modules-and-blocks/

I think we did
sm = 100×65
md = 326×159
lg = 700×357

NOTE: I highly recommend adding a custom compression amount to photos for WP as I’ve found that some of the pix created by theme with default WP compression level are waaaay to big.

For example on our site which is not yet optimized,
original article image 700×406 I uploaded is 31.14kb
http://publishersnewswire.com/META/PNW-Feb14-loudest.jpg
the theme/and WP created a 700×357 version, 63kb (!).

The hack to add the compression amount down to something like “50” is someplace in my prior posts. Recommended!!!

—updated——–
the code:

add the following code to your functions.php file in the theme root at the end –or– in your child theme (TIP: stop using a child theme)

add_filter( ‘jpeg_quality’, create_function( ”, ‘return 50;’ ) );

– then run the regenerate thumbnails plugin under wp admin > tools

EDIT (( AND REMEMBER TO BACKUP YOUR ORIGINAL PIX FIRST – !! ))

And one more FYI:
ga-ga is our test/optimization site
PNW is our “stock” site being used for comparison
(I have been called to other projects the past month and not working on either … hence why I was not around here for couple of weeks … and I will disappear again next week… sigh….deadlines!)

  • This reply was modified 12 years by simchris.
  • This reply was modified 12 years by simchris.
  • This reply was modified 12 years by simchris.
cityslicker444
tagDiv Member

Radu,

Thanks for the quick reply, but I am not happy with your response. First of all, I bought Magazinely theme a few months ago, and with the EXACT SAME QUESTION you answered it quickly and effectively. As a returning customer who is showing some loyalty to your themes and company, especially when changing the same website’s theme after only a few months, I expected at least the same amount of support, if not more.

Your answer here is more generic, and I don’t think you read my question properly. The sidebar is not for “pages” exactly, but my problem is rather for a custom post type that acts like pages, called “destinations.”

Previously, Marius or someone else at Tagdiv was helpful enough to correspond with me via email. With the old Magazinely theme, I was told to just take home.php and duplicate it into my child theme as single-destinations.php, and that allowed my custom post type to work properly.

I don’t need any custom work done. All I ask is for the same level of support that I was given last time, for my first purchase. I was a happy customer because of that, and I jumped at the opportunity to upgrade to this latest theme of yours. It shouldn’t take even five minutes to simply tell me what will fix my website.

PLEASE HELP ME FIX THIS PROBLEM, as my website is broken right now! All I need is for my custom post type “destinations” to act EXACTLY like the pages do, with the same sidebar options in the edit screen, the same rendering (title, no author, etc.), and things of that nature.

Once again, I appreciate the hard work that you have done on the theme, and I apologize at what I imagine looks to be ingratitude, but I am just frustrated as I am sitting with a broken website. Hope to hear back from you soon!

Christian

jhoaness
tagDiv Member

Hi I cant seem to find the wp-booster folder, is that included on the child theme?
thanks

NadiaP7406
tagDiv Member

When trying to use Custom CSS just on the parent theme, it doesn’t seem to apply either.
I have this:

.header-style-3 .td-logo img {
padding-top: 15px;
padding-bottom: 15px;}

.header-style-3 .container-fluid {
margin-top: 15px;
margin-bottom: 15px;
text-align: left !important;}

.sf-menu {
float: center !important;
text-align: center !important;}

But it’s not working. What can I do ??

NadiaP7406
Participant
#0

I uploaded and activated the child theme but anything I put in my style.css doesn’t seem to work. What can the problem be and how to fix it ?

regmanabq
Participant
#0

After just installing the theme I’m finding some things that I think might might make it better or that I found confusing. I thought I’d drop a line and share in the hopes of making the next version even better!

1- Sidebars Organization: Organize the sidebar listing in the widget section to more accurately show their true location. IE: the top right “social” sidebar lists under the “newspaper default” one on a clean install. It might make more sense to have this sidebar listed at the top since that’s it’s true location in the layout. (it was confusing when I had a recent post widget showing up in this sidebar and displaying in the top menu. Didn’t seem intuitive that this would be a sidebar nor did the description of the sidebar really describe it’s location or purpose)

2- Widget styles – Perhaps be a bit more descriptive in style names? IE: in the social icons icon style 1 could be “full color” and style 3 “light on dark” and style 4 “dark on dark”… just makes it easier to choose styles if we have some idea other than 1,2,3..ect…

Not sure if it’s just me after toying with a few themes, but a default child theme install with demo content seems to have some inactive sidebars by default with tagdiv widgets in them. At first my “social icon” sidebar actually had a recent post widget already assigned.

IE:

Inactive Sidebar (not used)
Inactive Sidebar (not used)
This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.
[tagDiv] Block 4
Inactive Sidebar (not used)
This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.
[tagDiv] Popular category
Inactive Widgets
Drag widgets here to remove them from the sidebar but keep their settings.

So far awesome theme!!! Just thought I’d pass along some things I noticed as I went through the install process. If it’s not helpful tell me! LOL, otherwise I’ll add more feedback as I come across it.

Radu A
tagDiv Member

hi,
it should work, try it.

Thanks for you message.
Radu A.

griffinassoc
Participant
#0

In the previous version of Newspaper I was able to over-ride /parts/header/header-style-3.php buy mirroring the folder in the child theme. Is this still possible?

For example, over-ride Newspaper/parts/header-style-3-logo.php by adding another version in Newspaper-child/parts/header-style-3-logo.php?

nate
tagDiv Member

Let me be sure I’m clear. I do not use “child categories”, only main categories and sometimes a post is in 2 or more categories. I need the theme to show all the categories a post is in.

nate
tagDiv Member

Marius, why doesn’t the td_module_blog.php file work in child theme? I tried deleting the Pinterest code in my child theme td_module_blog.php file and it didn’t work, it only works if I upload the changed file into the parent theme folder. Is this working as intended?

nate
tagDiv Member

Couldn’t you just hard code them into the style.css in your child theme? I would think that’d work, haven’t tried it though.

Radu
tagDiv Staff

@gaston I’ve added this to the todo list. V3.2 will also make child theme modification easier, we dump the variable concatenation in modules and we switched to plain html.

Radu O.

gaston
tagDiv Member

Thanks for you feedback Christopher.

We had to modify the parent functions.php too


@Radu
and co. please address this issue as soon as you can, we have the theme since version 1.0 and everytime we have to update it is a headache.

Best,

simchris
tagDiv Member

Gotcha – makes sense to me 🙂

Probably explains why the custom functions didn’t work for me one our two test sites.

I switched one from using child theme to only use parent (since Google doesn’t like the CSS redirect, for their own peculiar reasons) and simply edited the parent functions.php to put my custom functions at end (like changing compression rate for images, removing excess css publication, etc.).

Hopefully this will be addressed soon for those using child theme for mods.

gaston
tagDiv Member

Thanks @Christopher, but it doesn’t work for us, because the call is already defined on the parent functions.php and if we add it to the child functions.php the site breaks.

What we read around different forums is that the parent function has to be programmed conditionally and not load if it exists on the child theme that’s the code we’ll need to change and also be added to the new version.

Best,

simchris
tagDiv Member

The “normal” way to do this is to add the call to your child theme folder functions.php to pull the js from your child theme directory vs the parent directory.

http://wordpress.org/support/topic/how-to-add-js-files-to-child-theme

gaston
Participant
#0

Hey Guys,

We are using a child theme and need to modfify the file site.js

We copy the file to the corresponding child folder, but changes don’t take effect because WordPress is looking for the file on the parent folder.

We saw that parent’s function.php sets where to look for the .js files and that is on the parent’s directory instead of the child’s.

Is there a way we can accomplish this by not modifying the parent function.php file?

In case there is no other way than modifying the parent’s file let us know and please include that change on the next release.

Thanks,

dillermand16
tagDiv Member

Hey Marius. thank you very much!
Much appreciated. I did what you said but it is still just showing the “post date”
I did exactly what you said, but in a child theme. could that be the problem?

Ulmi
tagDiv Member

Thx, I’ve implemented it in the functions.php of the child theme:

function child_theme_setup() {
    add_image_size( 'art-wide', 326, 219, true );
}
add_action( 'after_setup_theme', 'child_theme_setup', 11 );
betterretailing
tagDiv Member

Ok so to clarify my problem.

I want to change the styling of the main title’s on posts and pages. I’m using a font that isn’t included in the theme and a size larger than the default of 40px.

So I added my own h1 styling to the child theme.
So far I’ve succesfully been able to change: The font-face, The font size, the letter-spacing, text-transform and padding.

However, when i try to change the line-height (px or %) or the color nothing happens. The only way I can change these particular elements seems to be within the Theme Panel (which doesn’t go beyond 40px)

There appears to be some default styling somewhere that is stopping me from making these changes. Please could you either point me to the bit of CSS thats affecting this or show me how to change the Theme panel defaults to go higher?

Many thanks!

Radu
tagDiv Staff

Hi,
you cannot use less in child themes easily because the child theme has to have the style in style.css. Are you working locally? If so:

* make a file style.less in the root of the child theme (where style.css is)
* copy less_files folder from the theme to the child theme
* add in style.less @import “less_files/main.less”;
* compile style.less to style.css via prepos http://alphapixels.com/prepros/ (ex: just drag and drop style.less in that program and it will compile it automatically to style.css)

keywords: less in child theme, using less, less compiler

Radu O.

Viewing 25 results - 12,751 through 12,775 (of 12,866 total)