What I need is to replicate what I did for paginated posts (see the link), with the twenty twenty two theme.
Basically I split my posts in two, to show the footnotes on a next page; and I use the pagination to get “see footnotes” and “back to article” buttons instead of: “Pages: 1, 2”
Of course, this is only meant for posts like this, split in two pages.
Since the twentytwentytwo theme doesn’t allow to change the PHP file, I need to use the apply_filter()
for wp_link_pages()
, and I have no idea how to do that.
So far, I managed to do the following with add_filter()
instead:
(in a child theme for twenty twenty two)
add_filter( 'wp_link_pages_args', 'my_function');
function my_function(){
$args = array(
'before' => '<div>',
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
'next_or_number' => 'next',
'separator' => ' | ',
'nextpagelink' => __( 'See the footnotes', '' ),
'previouspagelink' => __( 'Back to article', '' ),
'echo' => 1
);
return $args;
}
It works, but since I’m not using apply_filter()
as I should, I see the pagination also above the page (on the upper left corner, inside the body)
I guess it’s because I’m not using the hook I need to use and because I’m not defining the $output.
I have no idea how to do it.
Thank you so much in advanced!
]]>I’ve created a child theme, but its functions.php does not get read.
Does Iknow have an issue with child themes?
Installed the main theme as well as the Clean Fotografie child theme and activated the latter. Decided I liked it, but that it needs some adjusting. Fired up the Child Theme Configurator plugin to duplicate the child theme and work on that. The copy looks different than the original. Whether I choose the option for separate style sheet or primary style sheet.
Tried to create a new child theme, using the main theme as the source, same deal… Totally different looks.
So, the question arises what do you do in order to create your child themes that is different from the WordPress way?
Update: I made a 1 on 1 copy of the Clean Fotografie Child and the live preview shows all my menus (including non-active ones) in the same header location.
I repeat: what do you do differently?
]]>In order to get ready to create a child theme I use the Child Theme Configurator and their analysis gives:
Notice: Undefined offset: 0 in /var/www/wordpress/wp-content/themes/wikiwp/index.php on line 32
Notice: Trying to get property of non-object in /var/www/wordpress/wp-content/themes/wikiwp/index.php on line 32
Please contact this Theme’s author and report the items inside the box above. You may or may not be able to use this Theme as a Child Theme while these conditions exist.
After creating and activating the child theme the layout is completely messed up.
So, what’s wrong with this line 32 non-object?
]]>Thanks
]]>I just want all of my template edits in one logical place(preferably one file).
This is where I was pre this question
/* Theme customization-1-decrease distance between checkbox options in contactform 7
-------------------------------------------------------------- */
@import url(".../######.##/wp-content/plugins/contact-form-7/includes/css/styles.css");
.wpcf7-list-item {
margin-left: none !important;
}
/* Theme customization-2-add columns to contact form 7
-------------------------------------------------------------- */
@import url(".../#######.##/wp-content/plugins/contact-form-7/admin/css/styles.css");
.column-left{ float: left; width: 33%; }
.column-right{ float: right; width: 33%; }
.column-center{ display: inline-block; width: 33%; }
/* Theme customization-3
-------------------------------------------------------------- */
@import url("");
It would help if I could see an example of the structure of a post modified child theme. Preferably one built from a semi-complex premium template. Thanks in advance
]]>Can youn help me?
the page is: https://pilarfernandezbanuelos.es/
in the left column in the footer there is 3 ps with mail telephone address. if you see the code you can check it is there
What I have done wrong?
Thanks
]]>I’ve changed the menu background color (even though in Firebug it doesn’t seem to know that…). However, when I hover over a menu item, the background reverts back to the parent theme’s color. As you can see, I’ve tried to fix this by changing all of the id’s background colors, but it’s not working.
/*
Theme Name: Asokay Child Theme
Theme URI: https://madeleinebee.com/
Description: Child theme for the Toolbox theme
Author: Maddie
Author URI: https://madeleinebee.com/my-story/
Template: asokay
Version: 0.1.0
*/
@import url("../asokay/style.css");
/* Menu */
#access{
background:#F08080;
}
#access a{
background:#F08080;
color:white
}
#access ul{
background:#F08080;
}
#access li{
background:#F08080;
}
#access ul ul{
background:#F08080;
}
#access li:hover{
background:#F08080;
}
#access ul ul a:hover{
background:#F08080;
}
#access ul li:hover{
background:#F08080;
}
Furthermore, when I tried to change #access a{ font color, it would only change after I used the term “white” as opposed to #FFF8F0. What’s up with that?
I’m sure it’s operator error, so I’d be very appreciative to learn from this. Thank you!!!
Maddie
It looked decent, but I wanted to do some more customization not available through the godaddy wordpress in-site controls. That’s when I learned how to and decided to make a child theme. I put the child theme in a folder called “twentytwelve child” next to the original twentytwelve folder and activated the child menu in my browser.
/*
Theme Name: Twenty Twelve Child
Theme URI: https://madeleinebee.com/
Description: Child theme for the Twenty Twelve theme
Author: Maddie
Author URI: https://madeleinebee.com/my-story/
Template: twentytwelve child
Version: 0.1.0
*/
@import url(“../twentytwelve/style.css”);
Now, it looks awful! The menu is a list… there’s no header… there’s no background. Nothing. What did I do wrong? Thanks!
]]>